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
Connexion is incompatible with the latest version of the openapi-spec-validator (0.3.0 minimum).
This line: https://github.com/zalando/connexion/blob/1ed14fbde5be3d144760fec4982e90064f151e88/connexion/decorators/validation.py#L169
forces users to define a formData type parameters for each one of the attributes in the form data body (multipart/form-data content type).
This is not allowed by the spec, and as a result, an error is raised by 'openapi-spec-validator==0.3.0' upon starting the flask app.
Removal of the incorrect parameters lead to validation errors on request in Connexion (in strict mode), because connexion requires the parameters to be specified incorrectly in the spec file.
Expected behaviour
With no formData parameters present in the spec, no error should be raised upon validating an incoming request with form data payload.
Actual behaviour
With no formData parameters in the spec, an error is received upon validating incoming requests in strict mode: Extra formData parameter(s) user_id not in spec, with status code 400
Steps to reproduce
Install connexion==2.4.0
Using the following spec:
Start the server, and observe the error (from openapi-spec-validator) that states that UserIdParam does not validate (1in: formData1 is incorrect in the standard.
Then remove the UserIDParam parameter, start the server again, and try calling the api endpoint. With strict validation, you will get a 400 error saying that the formData parameter is missing.
Additional info:
Output of the commands:
python --version 3.7.9
pip show connexion | grep "^Version\:" 2.4.0
The text was updated successfully, but these errors were encountered:
This issue should be of high priority because it is now silently breaking many APIs without developers making any changes to their Connexion-specific code.
Description
Connexion is incompatible with the latest version of the openapi-spec-validator (0.3.0 minimum).
This line: https://github.com/zalando/connexion/blob/1ed14fbde5be3d144760fec4982e90064f151e88/connexion/decorators/validation.py#L169
forces users to define a
formData
type parameters for each one of the attributes in the form data body (multipart/form-data
content type).This is not allowed by the spec, and as a result, an error is raised by 'openapi-spec-validator==0.3.0' upon starting the flask app.
Removal of the incorrect parameters lead to validation errors on request in Connexion (in strict mode), because connexion requires the parameters to be specified incorrectly in the spec file.
Expected behaviour
With no
formData
parameters present in the spec, no error should be raised upon validating an incoming request with form data payload.Actual behaviour
With no
formData
parameters in the spec, an error is received upon validating incoming requests in strict mode:Extra formData parameter(s) user_id not in spec
, with status code 400Steps to reproduce
Install connexion==2.4.0
Using the following spec:
Start the server, and observe the error (from
openapi-spec-validator
) that states that UserIdParam does not validate (1in: formData1 is incorrect in the standard.Then remove the UserIDParam parameter, start the server again, and try calling the api endpoint. With strict validation, you will get a 400 error saying that the
formData
parameter is missing.Additional info:
Output of the commands:
python --version
3.7.9pip show connexion | grep "^Version\:"
2.4.0The text was updated successfully, but these errors were encountered: