hotosm / galaxy-api

Backend to fetch data from Underpass
https://galaxy-api.hotosm.org/latest/redoc
GNU Affero General Public License v3.0
14 stars 5 forks source link

Feature/API Versioning #274

Closed kshitijrajsharma closed 2 years ago

kshitijrajsharma commented 2 years ago

Redoc Can be checked here : http://52.203.15.233:8000/v1/redoc

Description :

Introduced new endpoints on following scenario : Major patches that requires URL change they will be updated like following : {API_URL}/_v{version_number}/

Docs will be different for different versions and also availability of api endpoints also differ from different version , can be accessed through /docs with each url

Backward compatibility is maintained on API , if new major change comes to specific endpoint they will be available as different version and previous version will still be able to deliver old info until we outdate it , It will be possible to release different version of same endpoint while maintaining all of versions like in the screenshot below image

This PR also introduces new URL called /latest/ -- which will always point to latest version of API , so it will be possible for the consumer to consume API without knowing version , they can go to specific version of API through version route i.e. /v{version_number}/

Uses -- fastapi-versioning

Screenshots :

image

image

image