Skip to content

🧹 Clarification: #1598

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

Open
nvartolomei opened this issue Apr 25, 2025 · 1 comment
Open

🧹 Clarification: #1598

nvartolomei opened this issue Apr 25, 2025 · 1 comment

Comments

@nvartolomei
Copy link

Specification section

https://json-schema.org/understanding-json-schema/structuring#dollarref

What is unclear?

In the Modular Schema Combination the $ref documentation section https://json-schema.org/understanding-json-schema/structuring#dollarref contains the following draft specific note:

In Draft 4-7, $ref behaves a little differently. When an object contains a $ref property, the object is considered a reference, not a schema. Therefore, any other properties you put in that object will not be treated as JSON Schema keywords and will be ignored by the validator. $ref can only be used where a schema is expected.

It makes perfectly clear how $ref should be treated there but it is not clear how it the object with additional properties should be handled in newer drafts.

Proposal

Would be helpful to have the description in proximity for completeness.

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

@nvartolomei
Copy link
Author

This seems to be relevant https://json-schema.org/draft/2020-12/json-schema-core#name-distinguishing-among-multip. So ... application defined? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant