Skip to content

Commit

Permalink
Improve schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxuanchiadm committed Feb 4, 2024
1 parent d6b1575 commit 76730c5
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions ecnpc/container.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@
]
}
},
"oneOf": [
{
"$ref": "#/definitions/container"
"if": {
"required": ["npc"]
},
"then": {
"$ref": "#/definitions/container"
},
"else": {
"type": "object",
"properties": {
"reference": {
"description": "用于引用已经注册过的NPC对象容器",
"type": "string"
}
},
{
"type": "object",
"properties": {
"reference": {
"description": "用于引用已经注册过的NPC对象容器",
"type": "string"
}
},
"required": [
"reference"
]
}
]
}
"required": [
"reference"
]
}

0 comments on commit 76730c5

Please sign in to comment.