-
-
Notifications
You must be signed in to change notification settings - Fork 751
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
Improve API validation so openapi.yaml file utilizes schemas from API model Python classes #3575
Labels
Comments
I would personally prefer to use API model as authoritative source, because:
If we want with the other approach, we would then have multiple files which are auto-generated and I would prefer to limit auto-generation to openapi file. |
cognifloyd
added a commit
that referenced
this issue
Aug 12, 2022
There are a lot of issues, so we're only partially validating the spec now. We still validate with prance, but skip checking x-api-model because there are so many legacy issues. I looked at adding the x-api-model ... but wow, we haven't been adding that for a long time. And there are open issues about it: #3575 #3788 So, we just make it possible, but optional, to run the schema validation.
cognifloyd
added a commit
that referenced
this issue
Aug 12, 2022
There are a lot of issues, so we're only partially validating the spec now. We still validate with prance, but skip checking x-api-model because there are so many legacy issues. I looked at adding the x-api-model ... but wow, we haven't been adding that for a long time. And there are open issues about it: #3575 #3788 So, we just make it possible, but optional, to run the schema validation.
cognifloyd
added a commit
that referenced
this issue
Aug 18, 2022
There are a lot of issues, so we're only partially validating the spec now. We still validate with prance, but skip checking x-api-model because there are so many legacy issues. I looked at adding the x-api-model ... but wow, we haven't been adding that for a long time. And there are open issues about it: #3575 #3788 So, we just make it possible, but optional, to run the schema validation.
cognifloyd
added a commit
that referenced
this issue
Aug 18, 2022
There are a lot of issues, so we're only partially validating the spec now. We still validate with prance, but skip checking x-api-model because there are so many legacy issues. I looked at adding the x-api-model ... but wow, we haven't been adding that for a long time. And there are open issues about it: #3575 #3788 So, we just make it possible, but optional, to run the schema validation.
cognifloyd
added a commit
that referenced
this issue
Aug 19, 2022
There are a lot of issues, so we're only partially validating the spec now. We still validate with prance, but skip checking x-api-model because there are so many legacy issues. I looked at adding the x-api-model ... but wow, we haven't been adding that for a long time. And there are open issues about it: #3575 #3788 So, we just make it possible, but optional, to run the schema validation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to improve / fix API validation so all the inputs are correctly validated based on the schema defined in openapi.yaml / API model.
Right now we have schemas from API models copy and pasted to openapi.yaml file and that's a maintenance nightmare (things will get out of sync, etc.).
We need to decide which place we want as an authoritative source (either API model Python classes or openapi.yaml file) and then write a generator which either writes schema to openapi.yaml file based on API model class definitions or vice-versa.
See #3573 (comment) for context.
The text was updated successfully, but these errors were encountered: