我正在尝试为带有子菜单的菜单创建正确的 JSON 模式。所以我应该从 item 定义一个数组,它应该包含三个项目。1 显示名称,2 URL 和 Children(应该是具有相同结构的对象数组)
这个时候我有这个:
{
"type": "array",
"additionalProperties": false, // have no idea what is this for :)
"items": {
"type": "object",
"additionalProperties": false, // have no idea what is this for :)
"description": "MenuLink",
"id": "menuLink",
"properties": {
"display_name": {
"type": "string",
"title": "Link display name",
"minLength": 2
},
"url": {
"type": "string",
"title": "URL address",
"minLength": 2
},
"children": {
"type": "array",
"title": "Childrens",
"additionalItems": false, // have no idea what is …Run Code Online (Sandbox Code Playgroud)