-
-
Notifications
You must be signed in to change notification settings - Fork 71
The unevaluatedItems lesson needs work #61
Copy link
Copy link
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
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
Type
Fields
Give feedbackNo fields configured for issues without a type.
The
unevaluatedItemslesson is a lesson foritems, notunevaluatedItems. While you can useunevaluatedItemsin place ofitemsand get the same result, this lesson does nothing to show an actual use case for the keyword. Notice that this passes the lesson.{ "type": "object", "properties": { "name": { "type": "string" }, "age": { "type": "integer" }, "skills": { "type": "array", "prefixItems": [ { "enum": ["HTML", "CSS", "JavaScript"] }, { "enum": ["HTML", "CSS", "JavaScript"] }, { "enum": ["HTML", "CSS", "JavaScript"] } ], "items": { "type": "string" } } } }A lesson on
unevaluatedItemsshould include extending and/or closing a tuple using an applicator of some kind. Here's an example of adding an item to the tuple and closing it to further extension.{ "$ref": "#/$defs/tuple", "prefixItems": [true, true, { "type": "number" }], "unevaluatedItems": false, "$defs": { "tuple": { "type": "array", "prefixItems": [ "type": "string", "type": "boolean" ] } } }