Open wlingze opened 4 days ago
需要支持json-schema:
需要支持: If-Then-Else allOf
yakit.AutoInitYakit() # Input your code! cli.Json("a", cli.setJsonSchema(<<<JSON { "type": "object", "properties": { "animal": { "enum": [ "Cat", "Fish" ] } }, "allOf": [ { "if": { "properties": { "animal": { "const": "Cat" } } }, "then": { "properties": { "food": { "type": "string", "enum": [ "meat", "grass", "fish" ] } }, "required": [ "food" ] } }, { "if": { "properties": { "animal": { "const": "Fish" } } }, "then": { "properties": { "food": { "type": "string", "enum": [ "insect", "worms" ] }, "water": { "type": "string", "enum": [ "lake", "sea" ] } }, "required": [ "food", "water" ] } }, { "required": [ "animal" ] } ] } JSON)) cli.check()
需要支持json-schema:
需要支持的代码