SwitchStatement 选择分支
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface SwitchStatement {
"concept": "SwitchStatement", // 产品概念
"cases": Array<SwitchCase>, // 选择分支情况列表
}
class SwitchStatementTreeNode {
ConceptEnum concept; // 产品概念
List<SwitchCaseTreeNode> cases; // 选择分支情况列表
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/SwitchStatement",
"definitions": {
"SwitchStatement": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "SwitchStatement"
},
"cases": {
"type": "array",
"items": {
"$ref": "#/definitions/SwitchCase"
}
}
},
"required": [
"concept",
"cases"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "SwitchStatement",
"cases": []
}
concept: SwitchStatement
cases: []