fix(json-schema): handle union object types in iterable properties#7726
Open
JakovKnezovicc wants to merge 1 commit intoapi-platform:mainfrom
Open
fix(json-schema): handle union object types in iterable properties#7726JakovKnezovicc wants to merge 1 commit intoapi-platform:mainfrom
JakovKnezovicc wants to merge 1 commit intoapi-platform:mainfrom
Conversation
3cf1c9d to
0d56929
Compare
0d56929 to
bf5c89f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fix JSON Schema generation for properties that are collections with PHP union types.
Motivation
When a property is iterable and typed as a union of object or generic types,
the generated schema did not properly expose item references, resulting in
incomplete
itemsdefinitions.Changes
UnionTypeon collection propertiesitems.anyOfwhen multiple refs are presentThis behavior was previously discussed in issue #2817.
Test coverage is intentionally omitted in this initial PR to validate the proposed approach. Once confirmed, I will add or adjust tests accordingly.