We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
class World(Resource): @api.marshal_with(bay_model, headers={"x-my-header": "description"}) def get(self, id): reuturn {"hello": "world"}
Make a response specific header doc
Raises error
return marshal_with(fields, ordered=self.ordered, **kwargs)(func) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: marshal_with.__init__() got an unexpected keyword argument 'headers'
I think it can be fixed by adding headers={} to __init__ in marshal_with.
headers={}
__init__
def __init__( self, fields, envelope=None, skip_none=False, mask=None, ordered=False, headers={} ):
The text was updated successfully, but these errors were encountered:
Hi @hjmallon When you say meant to support headers, can you point to where this is documented? Having trouble finding it!
Sorry, something went wrong.
I dont think it is documented, but it is mostly implemented. See:
flask-restx/flask_restx/swagger.py
Line 613 in 29dd1fa
As I say it is just that tiny change away from working as far as I can tell
No branches or pull requests
Repro Steps (if applicable)
Expected Behavior
Make a response specific header doc
Actual Behavior
Raises error
Error Messages/Stack Trace
Possible fix?
I think it can be fixed by adding
headers={}
to__init__
in marshal_with.The text was updated successfully, but these errors were encountered: