You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When flex is installed, it should not be the default unless the input document is swagger.
Minimal Example Spec
n/a
Actual Behaviour
When flex is installed, prance validate my_openapi3.yaml will emit
prance validate my_openapi3.yaml
Processing "my_openapi3.yaml"...
-> Resolving external references.
ERROR in "my_openapi3.yaml" [ValidationError]: ErrorDict(<class 'flex.exceptions.ErrorList'>, {'required': [ErrorDict(<class 'flex.exceptions.ErrorList'>, {'swagger': ['This value is required']})]})
The {'swagger': ['This value is required']} in there is reasonably informative if you know/remember what flex is looking for.
But it isnt a great UX for people using openapi3, which is going to be an increasing percentage of users as openapi v3 replaces swagger.
The easiest approach is to re-organise the imports in
If there is some backwards compatibility reason for keeping flex first, it should be possible for it to only be first if the context is a swagger input.
Steps to Reproduce
Install flex
Run prance validate any_openapi3_schema.yaml
Environment
OS: Linux
Python version: 3.10
Swagger/OpenAPI version used: 3.0
Backend: flex
The text was updated successfully, but these errors were encountered:
Expected Behaviour
When
flex
is installed, it should not be the default unless the input document is swagger.Minimal Example Spec
n/a
Actual Behaviour
When flex is installed,
prance validate my_openapi3.yaml
will emitThe
{'swagger': ['This value is required']}
in there is reasonably informative if you know/remember what flex is looking for.But it isnt a great UX for people using openapi3, which is going to be an increasing percentage of users as openapi v3 replaces swagger.
The easiest approach is to re-organise the imports in
prance/prance/util/__init__.py
Line 31 in bab4b38
openapi_spec_validator
is first, and IMO flex should be last it has seen releases recently at https://pypi.org/project/flex/, whileswagger_spec_validator
is better maintained.If there is some backwards compatibility reason for keeping
flex
first, it should be possible for it to only be first if the context is a swagger input.Steps to Reproduce
prance validate any_openapi3_schema.yaml
Environment
The text was updated successfully, but these errors were encountered: