developmentseed / tipg

Simple and Fast Geospatial OGC Features and Tiles API for PostGIS.
https://developmentseed.org/tipg/
MIT License
150 stars 22 forks source link

switch to Annotation type hint #76

Closed vincentsarago closed 1 year ago

vincentsarago commented 1 year ago

This PR update the style of dependencies type hints by using python Annotated type. ref:

This change is needed for https://github.com/developmentseed/tipg/issues/33

Cons

Sadly upgrading to FastAPI >0.94 means Optional Path Parameter is not supported anymore when using Query/Path parameter (see https://github.com/tiangolo/fastapi/discussions/9278, https://github.com/tiangolo/fastapi/pull/9670). This results in less description in OpenAPI for endpoints with optional tileMatrixSetId but I think for now this is not so bad.