-
Notifications
You must be signed in to change notification settings - Fork 5
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
Please ignore "anyOf type null" #113
Comments
Thank you for reporting. |
Seems null is allowed in openapi 3.1, but not in openapi 3.0. Reference: https://redocly.com/docs/openapi-visual-reference/null/ |
@ways The Executable Test Suite only supports OGC API - Environmental Data Retrieval (EDR) version 1.0.0 and 1.0.1. These versions of OGC API - EDR only support OpenAPI 3.0. If you would like future versions of OGC API - EDR to support OpenAPI 3.1, please create a GitHub Issue at https://github.com/opengeospatial/ogcapi-environmental-data-retrieval/issues |
Seems that's already discussed here opengeospatial/ogcapi-environmental-data-retrieval#375 I will leave my service as it is, and ignore the validation problem for now. |
Describe the bug
I generate my openapi spec using pydantic. When there are optional values, pydantic will output such:
The validator does not like this null value, and gives:
I'm not sure who are correct here, but I think it might be pydantic.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Allow "type: null" if the field is not required.
Additional context
Example openapi.json: https://github.com/metno/edrisobaric/blob/main/docs/openapi.json
The text was updated successfully, but these errors were encountered: