Open
Description
The unevaluatedItems
lesson is a lesson for items
, not unevaluatedItems
. While you can use unevaluatedItems
in place of items
and 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 unevaluatedItems
should 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"
]
}
}
}