给定以下JSON架构,是否可以指示"name"属性应该是唯一的(即,"element"数组中不应该有两个具有相同"name"的项.
{
"root": {
"type": "object",
"properties": {
"elements": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Element Name",
"minLength": 3,
},
"url": {
"type": "string",
"title": "Some URL"
}
}
}
}
}
}
}
I tried to use the uniqueItems keyword but it seems it was designed for simple lists of values.