developmentseed / titiler

Build your own Raster dynamic map tile services
https://developmentseed.org/titiler/
MIT License
755 stars 156 forks source link

Add method to define `path` for specific endpoint #457

Open vincentsarago opened 2 years ago

vincentsarago commented 2 years ago

Right now when using Factories we create endpoints with predefined paths https://github.com/developmentseed/titiler/blob/962dc605a73fdb4e134c4ad89463cd1e188ce02d/src/titiler/core/titiler/core/factory.py#L437-L441

Sometimes users would want a different schema (e.g no optional format in path or TileMatrixSet 🤷‍♂️)

The only example I know is stac-fastapi https://github.com/stac-utils/stac-fastapi/blob/06f610e74ca5eb1b28756ce66b508d5f974dd559/stac_fastapi/api/stac_fastapi/api/app.py#L172-L183

vincentsarago commented 1 year ago

note: in some ways I've been able to add path parameter to all endpoint within a Factory by adding prefix with {value}

https://github.com/stac-utils/titiler-pgstac/blob/b510490d0fc5764474493e206884773592a42f53/titiler/pgstac/main.py#L87-L95