SDFIdk / WEBPROJ

REST API exposing coordinate transformations with PROJ
MIT License
8 stars 6 forks source link

Add metadata to flask_restx.Api call #45

Closed larsnaesbye closed 2 years ago

larsnaesbye commented 2 years ago

Most of the metadata fields applicable to a Swagger definition can be set in the flask_restx.Api call. This would facilitate removal of step 6i from the conversion to OpenAPI as mentioned under release instructions.

The information could for example be loaded from a JSON file.

kbevers commented 2 years ago

Which fields are relevant to fill out?

larsnaesbye commented 2 years ago

These (and maybe more) are used in the Swagger documentation and carry over to OpenAPI:

description ([str](https://docs.python.org/3/library/stdtypes.html#str)) – The API description (used in Swagger documentation)
terms_url ([str](https://docs.python.org/3/library/stdtypes.html#str)) – The API terms page URL (used in Swagger documentation)
contact ([str](https://docs.python.org/3/library/stdtypes.html#str)) – A contact email for the API (used in Swagger documentation)
license ([str](https://docs.python.org/3/library/stdtypes.html#str)) – The license associated to the API (used in Swagger documentation)
license_url ([str](https://docs.python.org/3/library/stdtypes.html#str)) – The license page URL (used in Swagger documentation)
kbevers commented 2 years ago

Closed with #46