add legend / color key API endpoint

This commit is contained in:
Laura Klünder 2024-09-06 15:07:54 +02:00
parent 839d4beb7c
commit d49b6d6645
4 changed files with 65 additions and 4 deletions

View file

@ -805,6 +805,7 @@ class ProjectionPipelineSchema(BaseSchema):
example='+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs'
)
class ProjectionSchema(ProjectionPipelineSchema):
proj4: NonEmptyStr = APIField(
title='proj4 string',
@ -836,3 +837,15 @@ class ProjectionSchema(ProjectionPipelineSchema):
0, 0, 0, 1
]
)
class LegendItemSchema(BaseSchema):
title: NonEmptyStr = APIField()
fill: str | None
border: str | None
class LegendSchema(BaseSchema):
base: list[LegendItemSchema]
groups: list[LegendItemSchema]
obstacles: list[LegendItemSchema]