-
Notifications
You must be signed in to change notification settings - Fork 1
Add option for custom openapi metadata and dataset template file #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
api/openapi/openapi_metadata.py
Outdated
| openapi_metadata = { | ||
| "title": "EDR Observations API Europe EUMETNET", | ||
| "description": ( | ||
| "OGC EDR API data service for European meteorological observations from EUMETNET," | ||
| " co-funded by the European Union." | ||
| ), | ||
| "contact": { | ||
| "name": "EUMETNET", | ||
| "url": "https://www.eumetnet.eu/about-us/", | ||
| "email": "[email protected]", | ||
| }, | ||
| "license_info": { | ||
| "name": "CC-BY-4.0", | ||
| "url": "https://creativecommons.org/licenses/by/4.0/", | ||
| }, | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keep it symmetric and move this to a JSON file as well?
| | JINJA2_TEMPLATES | Path to a folder with jinja2 templates to override the default templates used by the API. See template section for details | ☐ | | ||
| | OPENAPI_METADATA_PATH | Path to an alternative OpenAPI metadata json file. It need to have the same fields as the openapi/openapi_metadata.py file. | ☐ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the mechanism to inject the JINJA templates and json files into the docker container?
api/routers/feature.py
Outdated
| Query( | ||
| description="Institution that published the data", | ||
| openapi_examples=openapi_examples.institution, | ||
| ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like your line width settings are different from 120 which is enforced in the pre-commit hooks...
Can you change that, so we don't get these unneeded diffs? ;-)
No description provided.