-
Notifications
You must be signed in to change notification settings - Fork 113
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
schema: Allow FieldSerializer to be called on AllOff/Dict/Object members #184
Comments
PS! It would be the user's responsibility to make sure that fields do not overlap between the different all-off members. E.g. if specifying a |
This issue is split out from #182, but the problem is the same. For
schema.AllOff
, if one or more of the members implement as aFieldSerialzier
, it should be called in a sensible manner.Let's discuss a littlebit what the most common use-case for
schema.AllOf
is before we jump to a soultion. In my mind, the most obvious use-case for AllOf is to validate both a common and a variable set of fields, e.g. something like this:where
commonSchema
defines a set of common fields that apply to all items, whileschemaA
andschemaB
describes e.g. a schema for what's valid when say a field "type" is equal either "A" or "B":That means, presumably, that for FieldSerializer selection on AllOf to be useful:
The text was updated successfully, but these errors were encountered: