generated from json-schema-org/repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
Status: AvailableNo one has claimed responsibility for resolving this issue.No one has claimed responsibility for resolving this issue.📝 DocumentationImprovements or additions to documentationImprovements or additions to documentation
Description
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 at https://example.com/address and then have then extend it by adding the type property.
{
"$ref": "https://example.com/address",
"properties": {
"type": { "enum": [ "residential", "business" ] }
},
"unevaluatedProperties": false,
"required": ["type"]
}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.)
Metadata
Metadata
Assignees
Labels
Status: AvailableNo one has claimed responsibility for resolving this issue.No one has claimed responsibility for resolving this issue.📝 DocumentationImprovements or additions to documentationImprovements or additions to documentation