fix(jsonschema): keep property metadata on reference schemas - #8480
Merged
soyuka merged 1 commit intoSep 2, 2026
Merged
Conversation
gaetan-petit
marked this pull request as draft
August 26, 2026 12:10
gaetan-petit
force-pushed
the
fix/jsonschema-keep-property-metadata-8453
branch
from
August 26, 2026 12:35
3ecc83a to
73d7da1
Compare
gaetan-petit
marked this pull request as ready for review
August 26, 2026 12:38
gaetan-petit
marked this pull request as draft
August 26, 2026 12:44
gaetan-petit
force-pushed
the
fix/jsonschema-keep-property-metadata-8453
branch
from
August 26, 2026 12:48
73d7da1 to
823533b
Compare
gaetan-petit
marked this pull request as ready for review
August 26, 2026 12:59
Member
|
I like this change thanks! |
soyuka
force-pushed
the
fix/jsonschema-keep-property-metadata-8453
branch
from
September 1, 2026 14:12
823533b to
eb239b2
Compare
buildPropertySchema() reset the property schema on an unresolved type, then replaced it with the `$ref` or `anyOf` instead of writing into it, dropping `description`, `default`, `example`, `readOnly` and the validator restrictions. Closes api-platform#8453
soyuka
force-pushed
the
fix/jsonschema-keep-property-metadata-8453
branch
from
September 2, 2026 08:02
eb239b2 to
e589972
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.
Properties typed after another class lost their
description,default,example,readOnlyand validator restrictions: buildPropertySchema() reset the schema on an unresolved type, then replaced it with the$reforanyOfinstead of writing into it.The reset now drops only the unresolved-type keys, and the reference branches assign into the schema, as buildLegacyPropertySchema() already does.
AI disclosure:
Review and test were done by Claude. I reviewed and tested everything.