Repository navigation
[java][Native] [#12911] Improve handling of oneOf/anyOf with mixed object and lists etc #25268
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,9 +5,9 @@ | |
|
|
||
| {{/description}} | ||
| ## oneOf schemas | ||
| {{#oneOf}} | ||
| * [{{{.}}}]({{{.}}}.md) | ||
| {{/oneOf}} | ||
| {{#composedSchemas.oneOf}} | ||
| * [{{dataType}}]({{#isArray}}{{#uniqueItems}}{{items.dataType}}{{/uniqueItems}}{{^uniqueItems}}{{items.dataType}}{{/uniqueItems}}{{/isArray}}{{^isArray}}{{#isMap}}{{items.dataType}}{{/isMap}}{{^isMap}}{{dataType}}{{/isMap}}{{/isArray}}.md) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Nested container alternatives still produce broken documentation links: Prompt for AI agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Majority of the time, this won't be needed since it would normally be then wrapped in a named object schema. (or can be restructured to be like so) |
||
| {{/composedSchemas.oneOf}} | ||
|
|
||
| {{#isNullable}} | ||
| NOTE: this class is nullable. | ||
|
|
||
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.
P1: The anyOf deserializer still attempts every alternative for every JSON shape. Gate list alternatives on
START_ARRAYand object alternatives onSTART_OBJECTbefore binding to prevent false or ambiguous matches.Prompt for AI agents