add tons of mapdata endpoints, enhance documentation and operation IDs
This commit is contained in:
parent
7447537c4a
commit
f43d458fc4
12 changed files with 637 additions and 169 deletions
15
src/c3nav/mapdata/newapi/map.py
Normal file
15
src/c3nav/mapdata/newapi/map.py
Normal 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(),
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue