-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request header params ignored #850
Comments
The headers are accessible via the flask
There's discussion on #788 to pass the headers into the handler function, but for now you have to use the request object when using flask. |
@dtkav right, I mean, it's just not working out of box with pre-generated model & server code from openapi-generator-cli which assumes that all defined parameters in the spec file are passed into the contoller. |
check this
|
Check this for a workaround, if anyone is looking for it. |
Description
for openapi spec 3, it seems that the header arguments are completely ignored.
For example,
openapi-generator-cli.jar
generates related controller (method), where the header argument defined in the spec, is to be found as positional argument.venv3/lib/python3.6/site-packages/connexion/operations/abstract.py -> get_arguments() does not care about header arguments at all and so, does not pass required positional argument (as generated), into the controller.
Expected behaviour
it is expected that header arguments will be passed into controller cls/method as any other arguments (query, path)
Actual behaviour
request header arguments are ignored = not passed into callable (controller method)
Steps to reproduce
Invoking GET method on /dogs returns:
The text was updated successfully, but these errors were encountered: