Variable 变量
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface Variable {
"concept": "Variable", // 产品概念
"name": string, // 变量名称
"description": string, // 变量描述
"typeAnnotation": TypeAnnotation, // 类型
"defaultValue": string, // 默认值
}
class VariableTreeNode {
ConceptEnum concept; // 产品概念
String name; // 变量名称
String description; // 变量描述
TypeAnnotationTreeNode typeAnnotation; // 类型
String defaultValue; // 默认值
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Variable",
"definitions": {
"Variable": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Variable"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"defaultValue": {
"type": "string"
}
},
"required": [
"concept",
"name",
"description",
"typeAnnotation",
"defaultValue"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "Variable",
"name": "param1",
"description": "",
"typeAnnotation": null,
"defaultValue": null
}
concept: Variable
name: param1
description: ""
typeAnnotation: null
defaultValue: null