Ignore sibling logic if the property type is not a valid sibling candidate #5048
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.
Pull Request
Thank you for contributing to swagger-core!
Please fill out the following information to help us review your PR efficiently.
Description
Draft until I figure out whether the changes in
AnnotationUtilsandgetArraySchemawith theprefixItems-construction is actually a correct approach.Changes so that schema annotations are only removed for oas31 sibling handling if the property being interpreted is actually a sibling candidate (i.e., it will in the end involve a reference to a schema, so not
List<String>for example). Previously the annotations were dropped simply based on the target specification version being 3.1.I utilize tests and fixes provided by @ewaostrowska in ewaostrowska@2c91c03, 3157e48 and ewaostrowska@149c97a to showcase that the logic fixes the cases that have been presented in the issues.
Fixes #4993, #5012 and #5013.
Type of Change
Checklist
Screenshots / Additional Context