-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow passing a schema class instead of schema instances #244
Comments
Somewhat related to #238. I guess I was thinking that individual views might want to pass things into schema constructors, but that's never really happened. Though, in practice, in a Flask context, wouldn't it be nearly equivalent to use |
Hm, we could do what DRF does and allow either a
|
@sloria if multiple schemas need to be instantiated multiple times per-request, then they will have a separate context, so no problem there? |
@itajaja If you need a separate context per-instance, then That said, I guess you could work around this by setting |
@itajaja is saying that if you have separate instances, then you would in fact be able to set |
Passing a schema instance makes it impossible to use schema
context
safely.The text was updated successfully, but these errors were encountered: