Use $ref instead of allOf for Extending Closed Schemas #65
Labels
📝 Documentation
Improvements or additions to documentation
Status: Available
No one has claimed responsibility for resolving this issue.
Lesson Link: https://tour.json-schema.org/content/07-Miscellaneous/01-Extending-Closed-Schemas-with-unevaluatedProperties
The "Extending Closed Schemas" lesson uses
allOf
for the example, which is fine, but it's not a normal case. In a previous lesson, you specify that you've make available a schema with a certain URI that you want the user to reference. This would be a great time to employ that technique. You provide an address schema athttps://example.com/address
and then have then extend it by adding thetype
property.This is a much more realistic way to show what this keyword is good for.
(Also, I think the
unevaluatedItems
should look a lot like this lesson except for arrays instead of objects.)The text was updated successfully, but these errors were encountered: