-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add support for anyof_ref #72
Conversation
Signed-off-by: Glenn Lewis <[email protected]>
Signed-off-by: Glenn Lewis <[email protected]>
Signed-off-by: Glenn Lewis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. I suspect this might have conflicts with #69 (ipAddress
could be ip_address
to be more consistent with the other examples)
Signed-off-by: Glenn Lewis <[email protected]>
These two PRs should actually merge nicely with each other. I first implemented the feature in #69 and later added this feature, but both work together in my repo. I'll help with the merging when it comes time and resolve any conflicts. Sorry for the delay. I addressed the review feedback. PTAL. |
Signed-off-by: Glenn Lewis <[email protected]>
@@ -37,6 +37,8 @@ type TestUser struct { | |||
BirthDate time.Time `json:"birth_date,omitempty" jsonschema:"oneof_required=date"` | |||
YearOfBirth string `json:"year_of_birth,omitempty" jsonschema:"oneof_required=year"` | |||
Metadata interface{} `json:"metadata,omitempty" jsonschema:"oneof_type=string;array"` | |||
IPAddress2 interface{} `json:"ip_address2,omitempty" jsonschema:"anyof_ref=#/$defs/ipv4;#/$defs/ipv6"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think these are important enough to stick in the README. I think the best way forward here is with some custom tests inside the refect_test.go file.
This is now fixed in #92. Thanks! |
Fixes: #71.