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

Passing kwargs to Schema #501

Open
Philipp-g opened this issue Dec 21, 2018 · 1 comment
Open

Passing kwargs to Schema #501

Philipp-g opened this issue Dec 21, 2018 · 1 comment

Comments

@Philipp-g
Copy link

Since #482 Cornice only accepts a Marshmallow Schema instead of a Schema instance. So I was wondering if it is possible to pass arguments to the schema instantiation.

I just glanced through the code and this suggests that it is not possible right now.

def _instantiate_schema(schema):
if not inspect.isclass(schema):
raise ValueError('You need to pass Marshmallow class instead '
'of schema instance')
return schema()

@leplatrem
Copy link
Contributor

ping @ergo :)

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

2 participants