鉴于以下JSON模式是有可能表明,"名称"属性应是唯一的(即不应该有两个项目具有相同的"名"的"元素"阵列英寸
{
"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"
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我尝试使用uniqueItems关键字,但它似乎是为简单的值列表而设计的.