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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@rochacbruno

rochacbruno Feb 14, 2018

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@robertlagrant

robertlagrant 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.

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

This comment has been minimized.

Show comment
Hide comment
@javabrett

javabrett Sep 19, 2018

Collaborator

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.

Collaborator

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