more map api documentation improvements

This commit is contained in:
Laura Klünder 2023-12-04 18:58:49 +01:00
parent 4d57b81ad1
commit 964574e535
8 changed files with 335 additions and 121 deletions

View file

@ -22,8 +22,7 @@ class SwaggerAndRedoc(DocsBase):
redoc_config = Redoc(settings={
"hideOneOfDescription": True,
"expandSingleSchemaField": True,
"jsonSampleExpandLevel": 4,
"showObjectSchemaExamples": True,
"jsonSampleExpandLevel": 5,
"expandResponses": "200",
"hideSingleRequestSampleTab": True,
"nativeScrollbars": True,

View file

@ -25,6 +25,9 @@ class PolygonSchema(Schema):
example=[[[1.5, 1.5], [1.5, 2.5], [2.5, 2.5], [2.5, 2.5]]]
)
class Config(Schema.Config):
title = "GeoJSON Polygon"
class LineStringSchema(Schema):
"""
@ -35,6 +38,9 @@ class LineStringSchema(Schema):
example=[[1.5, 1.5], [2.5, 2.5], [5, 8.7]]
)
class Config(Schema.Config):
title = "GeoJSON LineString"
class LineSchema(Schema):
"""
@ -45,6 +51,9 @@ class LineSchema(Schema):
example=[[1.5, 1.5], [5, 8.7]]
)
class Config(Schema.Config):
title = "GeoJSON LineString (only two points)"
class PointSchema(Schema):
"""
@ -55,6 +64,9 @@ class PointSchema(Schema):
example=[1, 2.5]
)
class Config(Schema.Config):
title = "GeoJSON Point"
GeometrySchema = Annotated[
Union[