EnumItem 枚举值
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface EnumItem {
"concept": "EnumItem", // 产品概念
"value": string, // 枚举值的值
"label": string, // 枚举值标题
}
class EnumItemTreeNode {
ConceptEnum concept; // 产品概念
String value; // 枚举值的值
String label; // 枚举值标题
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/EnumItem",
"definitions": {
"EnumItem": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "EnumItem"
},
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"concept",
"value",
"label"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "EnumItem",
"value": "Red",
"label": "红色"
}
concept: EnumItem
value: Red
label: 红色
详细参考Enum 枚举-示例。