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