Skip to content
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

Validation with definitions mixed in with allOf #179

Open
robertlagrant opened this issue Feb 14, 2018 · 3 comments
Open

Validation with definitions mixed in with allOf #179

robertlagrant opened this issue Feb 14, 2018 · 3 comments

Comments

@robertlagrant
Copy link

@robertlagrant robertlagrant commented Feb 14, 2018

I'm struggling to make flassger validation work with allOf'd definitions pulled into my resource definition. Using validation=True seems to always pass, and using validate() seems to not like traversing definitions via allOf.

I've created a sample project to illustrate: https://github.com/robertlagrant/flasgger_validation

@rochacbruno rochacbruno added the bug label Feb 14, 2018
@rochacbruno
Copy link
Member

@rochacbruno rochacbruno commented Feb 14, 2018

The validator uses jsonschema while allOf seems to be a swagger specific rule. We need to include this exception or find a swagger validation library to replace jsonschema.

@robertlagrant
Copy link
Author

@robertlagrant robertlagrant commented Feb 14, 2018

@rochacbruno thanks - makes sense. I'm still getting up to speed with Python's Swagger tooling, but Flex seems plausible?

Edit: actually, Flex seems to need a Requests Request or a urllib2 Request to validate. I'm not sure whether or not it can cope with Werkzeug requests. It looks as though it's built to validate from the client's point of view, not the server's, for some reason.

@javabrett
Copy link
Collaborator

@javabrett javabrett commented Sep 19, 2018

I was looking around for validators and wondered whether either https://github.com/Yelp/bravado-core or https://github.com/Yelp/swagger_spec_validator would be any help.

Do we know whether validation of this kind would have changed between Swagger 2.0 and OpenAPI 3.0? Since a number of libraries have not claimed 3.0 support yet. If I understand correctly, the main difference to jsonschema is the linking and dereferencing that his required to link the schemata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.