add tons of mapdata endpoints, enhance documentation and operation IDs

This commit is contained in:
Laura Klünder 2023-11-19 15:34:08 +01:00
parent 7447537c4a
commit f43d458fc4
12 changed files with 637 additions and 169 deletions

View file

@ -0,0 +1,15 @@
from ninja import Router as APIRouter
from c3nav.api.newauth import auth_responses
from c3nav.mapdata.models import Source
from c3nav.mapdata.schemas.responses import BoundsSchema
map_api_router = APIRouter(tags=["map"])
@map_api_router.get('/bounds/', summary="Get map boundaries",
response={200: BoundsSchema, **auth_responses})
def bounds(request):
return {
"bounds": Source.max_bounds(),
}