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
Follow the steps explained in README.md to bootstrap and launch a connexion server running a FlaskApp and serving the "Pets Spec".
Modify the specs/openapi.yaml and adapt the schema for the parameter limit (which appears at line 20), the following way:
parameters:
- name: limit
in: query
description: How many items to return at one time (max 100)
required: false
schema:
oneOf:
- type: integer
format: int32
Relaunch the app if running, or just launch if not.
Do a curl against the GET /pets endpoint passing a valid value on the limit query param
File "connexion/examples/methodresolver/my-venv/lib/python3.10/site-packages/connexion/validators/parameter.py", line 104, in validate
self.validate_request(request)
File "connexion/examples/methodresolver/my-venv/lib/python3.10/site-packages/connexion/validators/parameter.py", line 108, in validate_request
query_errors = self.validate_query_parameter_list(
File "connexion/examples/methodresolver/my-venv/lib/python3.10/site-packages/connexion/validators/parameter.py", line 73, in validate_query_parameter_list
request_params = request.query_params.keys()
File "connexion/examples/methodresolver/my-venv/lib/python3.10/site-packages/connexion/lifecycle.py", line 199, in query_params
self._query_params = self.uri_parser.resolve_query(query_params)
File "connexion/examples/methodresolver/my-venv/lib/python3.10/site-packages/connexion/uri_parsing.py", line 220, in resolve_query
return self.resolve_params(query_data, "query")
File "connexion/examples/methodresolver/my-venv/lib/python3.10/site-packages/connexion/uri_parsing.py", line 114, in resolve_params
if param_schema and param_schema["type"] == "array":
KeyError: 'type'
The method AbstractURIParser::resolve_params seems not to be aware of the "multiple criteria schemas" and expects for a single schema; while on the other hand the body validation supports this kind of complex schemas.
The text was updated successfully, but these errors were encountered:
Description
When sending a request to Connection at an endpoint which has a param with an
schema
containing:oneOf
anyOf
allOf
.. an unhandled KeyError exception occurs at uri_parsing.py:114
Steps to reproduce
Follow the steps explained in
README.md
to bootstrap and launch a connexion server running a FlaskApp and serving the "Pets Spec".Modify the
specs/openapi.yaml
and adapt the schema for the parameterlimit
(which appears at line 20), the following way:Relaunch the app if running, or just launch if not.
Do a
curl
against theGET /pets
endpoint passing a valid value on thelimit
query paramAdditional info
That's the exception trace:
The method
AbstractURIParser::resolve_params
seems not to be aware of the "multiple criteria schemas" and expects for a single schema; while on the other hand the body validation supports this kind of complex schemas.The text was updated successfully, but these errors were encountered: