@nju33/json-schema
Version:
[](https://www.npmjs.com/package/@nju33/json-schema)
40 lines (36 loc) • 544 B
JSON
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "JSON schema for test",
"type": "object",
"properties": {
"var": {
"type": "string",
"enum": ["foo", "hoge"],
"default": "foo"
}
},
"if": {
"properties": {
"var": {
"const": "foo"
}
}
},
"then": {
"properties": {
"foo": {
"type": "string"
}
}
},
"else": {
"properties": {
"hoge": {
"type": "string"
}
}
},
"dependencies": {
"foo": ["var"]
}
}