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
We use a custom uri_parser to serve requests like this http://localhost:8080/api/inventory/v1/hosts?fields[system_profile]=arch,cpu_flags. The uri_parser converts "fields[system_profile]=arch,cpu_flag" to {'fields': {'system_profile': {'arch': True, 'cpu_flags': True}}}. This is has been working as expected and has been using connexion v2.14.2. The following code snippet shows how the custom uri_parser was provided as a `connexion_option.
Now I need to upgrade the connexion to v3.0.6, which requires the custom uri_parser be provided directly to the FlaskApp or as an argument to the `FlaskApp.add_api() call.
When using connexion v3.0.6, the customURIParser should transform the input URI to an expected form but it does not. Debugger does not even hit this code. i.e. the customURIParser is ignored altogether.
# `connexion v2.14.2`
from connexion.decorators.response import ResponseValidator
from connexion.decorators.validation import ParameterValidator
from connexion.decorators.uri_parsing import OpenAPIURIParser
# `connexion v3.0.6`
from connexion.validators.abstract import AbstractResponseBodyValidator
from connexion.validators.parameter import ParameterValidator
from connexion.uri_parsing import OpenAPIURIParser
Actual behaviour
Steps to reproduce
Use the code snippet provided above.
Additional info:
Python 3.9.18
connexion version: 3.0.6
The text was updated successfully, but these errors were encountered:
Description
We use a custom uri_parser to serve requests like this http://localhost:8080/api/inventory/v1/hosts?fields[system_profile]=arch,cpu_flags. The
uri_parser
converts"fields[system_profile]=arch,cpu_flag"
to{'fields': {'system_profile': {'arch': True, 'cpu_flags': True}}}
. This is has been working as expected and has been usingconnexion v2.14.2
. The following code snippet shows how the customuri_parser
was provided as a `connexion_option.Now I need to upgrade the
connexion
tov3.0.6
, which requires the customuri_parser
be provided directly to theFlaskApp
or as an argument to the `FlaskApp.add_api() call.With this change when the request http://localhost:8080/api/inventory/v1/hosts?fields[system_profile]=arch,cpu_flags is hit, the
customURIParser
is not hit at all, ifstrict_validation=True
is used. ThecustomURIParser
is hit as expected IFstrict_validation=False
is used.Questions:
I will appreciate any help I can get.
Thanks.
Expected behaviour
When using
connexion v3.0.6
, thecustomURIParser
should transform the input URI to an expected form but it does not. Debugger does not even hit this code. i.e. thecustomURIParser
is ignored altogether.If it helps, here is the
validator_map
:The import packages are:
Actual behaviour
Steps to reproduce
Use the code snippet provided above.
Additional info:
Python 3.9.18
connexion version: 3.0.6
The text was updated successfully, but these errors were encountered: