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

ValidationError with Swagger Petstore v3 specification #63

Open
userwizz opened this issue Oct 4, 2022 · 0 comments
Open

ValidationError with Swagger Petstore v3 specification #63

userwizz opened this issue Oct 4, 2022 · 0 comments

Comments

@userwizz
Copy link

userwizz commented Oct 4, 2022

Hello,

I just started to play around with this library and took Open API Petstore v3 as my starting point. Now when trying to generate code I get:
prance.ValidationError: Version mismatch: selected backend "flex" does not support specified version 3.0.2!

Spec I'm using:
https://petstore3.swagger.io/ --> https://petstore3.swagger.io/api/v3/openapi.json

I also tried to validate spec by calling prance directly and got same error:

$ prance.exe validate petstore_v3.json
Processing "petstore_v3.json"...
 -> Resolving external references.
ERROR in "petstore_v3.json" [ValidationError]: Version mismatch: selected backend "flex" does not support specified version 3.0.2!

But when changing backend to 'openapi-spec-validator' it works fine.

$ prance.exe validate --backend openapi-spec-validator petstore_v3.json
Processing "petstore_v3.json"...
 -> Resolving external references.
Validates OK as OpenAPI 3.0.2!

-> prance seems to use flex as default backend if flex lib is installed.
--> So the question is: should roboswag library use 'openapi-spec-validator' as backend instead of 'flex' in case of v3 spec? Or am I missing something here?
See also: https://prance.readthedocs.io/en/latest/#compatibility

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

No branches or pull requests

1 participant