Skip to content
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

Flask_apispec version of @use_kwargs not compatible with unknown parameter #242

Open
quaxsze opened this issue Sep 22, 2022 · 0 comments
Open

Comments

@quaxsze
Copy link

quaxsze commented Sep 22, 2022

When using @use_kwargs with the unknown parameter, to be able to use the unknown parameter of the schema, as described here in the webargs documentation:

class RandomSchema(Schema):
    class Meta:
        unknown = EXCLUDE

@use_kwargs(RandomSchema, location="json", unknown=None)

The following exception is raised:
TypeError: schema2parameters() got an unexpected keyword argument 'unknown'
Would it be possible for flask_apispec version of @use_kwargs to support this parameter?
I could use the webargs version of @use_kwargs but it won't annotate the schema for swagger isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant