ConfigProperty 配置属性
1. 结构声明
- TS Declaration
- JSON Schema
class ConfigProperty extends BaseNode {
name: string = '';
description?: string;
values: Array<ConfigPropertyValue>;
isPrivate?: boolean = false;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"values": {
"type": "array",
"items": {
"$ref": "#/definitions/ConfigPropertyValue"
}
},
"isPrivate": {
"type": "boolean"
}
},
"required": [
"name",
"values"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "ConfigProperty",
"name": "url",
"description": "参数路径",
"values": [
{
"concept": "ConfigPropertyValue",
"env": "dev",
"value": "dev-domain.com"
},
{
"concept": "ConfigPropertyValue",
"env": "online",
"value": "domain.com"
}
],
"isPrivate": false
}
concept: ConfigProperty
name: url
description: 参数路径
values:
- concept: ConfigPropertyValue
env: dev
value: dev-domain.com
- concept: ConfigPropertyValue
env: online
value: domain.com
isPrivate: false
对应的代码如下:
- 文本化 NASL
- Natural TS
[编译方法未实现]