-
Notifications
You must be signed in to change notification settings - Fork 44
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
Pass constructor arguments to new schema instances #15
base: main
Are you sure you want to change the base?
Conversation
👍 Could really use this! |
Closing this, as it has gone stale. Feel free to re-open if this is still relevant. |
@sloria This is a PR. Rather than closing this as a stale issue, shouldn't you evaluate the PR and the corresponding test? |
My availability for reviewing PRs for this project has been quite low, unfortunately. I close stale PRs to reduce the maintenance burden. My thought is that if the PRs are still relevant, the author will either re-make the PR or someone will speak up, which you've just done.. so I'll re-open 😅 |
Any updates on this? I am encountering this problem because I want to do this:
which raises Note: The PR in its current form would still raise this ValueError because "only" would get passed to the parent Schema, where the field isn't defined. So it might need to be updated as:
As a workaround I am currently using:
|
Type specific schemas don't respect excludes passed to
OneOfSchema
.This adds an
__init__
method to theOneOfSchema
class so the instantiation arguments can be saved and passed to the type specific schemas when they are created.