SDFIdk / skraafoto_stac_public

Other
6 stars 1 forks source link

Wrong datatype shown in example value for bbox and intersects in Openapi POST /search #45

Open seskildsen opened 2 years ago

seskildsen commented 2 years ago

The datatype should be float but display as string.

Screenshot from 2022-06-07 09-35-22

AsgerPetersen commented 2 years ago

I think the type is defined as NumType = Union[float, int] here https://github.com/developmentseed/geojson-pydantic/blob/25910ca48e88acd8a990d10c2850e9fe7030a4b6/geojson_pydantic/types.py#L7

Why it is presented as string 🤷‍♂️

There are other issues regarding this type union: https://github.com/samuelcolvin/pydantic/issues/1423#issuecomment-642797287. It seems to be unrelated...

AsgerPetersen commented 2 years ago

Looking at the json it seems to be correct (or at least not "wrong"):

image

The openapi javascript client itself complains when rendering this:

image

So far I have no idea how to fix this.