MarketSquare / MarketSquare/roboswag
ValidationError with Swagger Petstore v3 specification
- Dominant language
- Python
- Stars
- 29
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Research direction
Reproduce the failure with the linked Petstore OpenAPI v3 specification using the prance validate entry point and compare the default flex backend with openapi-spec-validator. Trace how roboswag selects its validation backend; done means the intended backend behavior for OpenAPI 3.0.2 is established and covered by an appropriate regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100