@nasl/ast-mini
Version:
Mini collection of NASL AST
1,684 lines (1,683 loc) • 65.5 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Enum": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Enum"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"enumItems": {
"type": "array",
"items": {
"$ref": "#/definitions/EnumItem"
}
},
"valueType": {
"$ref": "#/definitions/TypeAnnotation"
}
},
"required": [
"concept",
"composedBy",
"name",
"label",
"description",
"enumItems",
"valueType"
],
"additionalProperties": false,
"description": "枚举"
},
"EnumItem": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "EnumItem"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"value": {
"type": "string"
},
"label": {
"$ref": "#/definitions/StaticString"
}
},
"required": [
"concept",
"composedBy",
"value",
"label"
],
"additionalProperties": false,
"description": "枚举值"
},
"StaticString": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "StaticString"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"value": {
"type": "string"
},
"i18nKey": {
"type": [
"null",
"string"
]
}
},
"required": [
"concept",
"composedBy",
"value",
"i18nKey"
],
"additionalProperties": false,
"description": "静态字符串"
},
"TypeAnnotation": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "TypeAnnotation"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"typeKind": {
"type": "string",
"enum": [
"primitive",
"reference",
"generic",
"typeParam",
"function",
"union",
"anonymousStructure"
]
},
"typeNamespace": {
"type": [
"null",
"string"
]
},
"typeName": {
"type": [
"null",
"string"
]
},
"typeArguments": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/TypeAnnotation"
}
}
]
},
"returnType": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/TypeAnnotation"
}
}
]
},
"inferred": {
"type": [
"null",
"boolean"
]
},
"properties": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/StructureProperty"
}
}
]
},
"ruleMap": {
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"additionalProperties": {
"type": "number"
}
}
]
}
},
"required": [
"concept",
"composedBy",
"typeKind",
"typeNamespace",
"typeName",
"typeArguments",
"returnType",
"inferred",
"properties",
"ruleMap"
],
"additionalProperties": false,
"description": "类型标注"
},
"StructureProperty": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "StructureProperty"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"typeAnnotation": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/TypeAnnotation"
}
]
},
"defaultValue": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/DefaultValue"
}
]
},
"jsonName": {
"type": [
"null",
"string"
]
}
},
"required": [
"concept",
"composedBy",
"name",
"label",
"description",
"typeAnnotation",
"defaultValue",
"jsonName"
],
"additionalProperties": false,
"description": "数据结构属性"
},
"DefaultValue": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "DefaultValue"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"expression": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/LogicItem"
}
]
},
"playground": {
"type": "array",
"items": {
"$ref": "#/definitions/LogicItem"
}
}
},
"required": [
"concept",
"composedBy",
"expression",
"playground"
],
"additionalProperties": false,
"description": "默认值"
},
"LogicItem": {
"anyOf": [
{
"$ref": "#/definitions/Destination"
},
{
"$ref": "#/definitions/Argument"
},
{
"$ref": "#/definitions/Anchor"
},
{
"$ref": "#/definitions/ExternalDestination"
},
{
"$ref": "#/definitions/ValidationRule"
}
]
},
"Destination": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Destination"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"folded": {
"type": [
"null",
"boolean"
]
},
"offsetX": {
"type": [
"null",
"number"
]
},
"offsetY": {
"type": [
"null",
"number"
]
},
"typeAnnotation": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/TypeAnnotation"
}
]
},
"viewNamespace": {
"type": [
"null",
"string"
]
},
"viewName": {
"type": [
"null",
"string"
]
},
"arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/Argument"
}
},
"target": {
"type": "string",
"enum": [
"_self",
"_blank",
"_parent",
"_top"
]
},
"anchor": {
"$ref": "#/definitions/Anchor"
}
},
"required": [
"concept",
"composedBy",
"label",
"description",
"folded",
"offsetX",
"offsetY",
"typeAnnotation",
"viewNamespace",
"viewName",
"arguments",
"target",
"anchor"
],
"additionalProperties": false,
"description": "跳转页面"
},
"Argument": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Argument"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"folded": {
"type": [
"null",
"boolean"
]
},
"offsetX": {
"type": [
"null",
"number"
]
},
"offsetY": {
"type": [
"null",
"number"
]
},
"typeAnnotation": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/TypeAnnotation"
}
]
},
"keyword": {
"type": "string"
},
"spread": {
"type": [
"null",
"boolean"
]
},
"expression": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/LogicItem"
}
]
}
},
"required": [
"concept",
"composedBy",
"label",
"description",
"folded",
"offsetX",
"offsetY",
"typeAnnotation",
"keyword",
"spread",
"expression"
],
"additionalProperties": false,
"description": "实际参数"
},
"Anchor": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Anchor"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"folded": {
"type": [
"null",
"boolean"
]
},
"offsetX": {
"type": [
"null",
"number"
]
},
"offsetY": {
"type": [
"null",
"number"
]
},
"typeAnnotation": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/TypeAnnotation"
}
]
},
"expression": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/LogicItem"
}
]
}
},
"required": [
"concept",
"composedBy",
"label",
"description",
"folded",
"offsetX",
"offsetY",
"typeAnnotation",
"expression"
],
"additionalProperties": false,
"description": "锚点参数"
},
"ExternalDestination": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "ExternalDestination"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"folded": {
"type": [
"null",
"boolean"
]
},
"offsetX": {
"type": [
"null",
"number"
]
},
"offsetY": {
"type": [
"null",
"number"
]
},
"typeAnnotation": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/TypeAnnotation"
}
]
},
"link": {
"$ref": "#/definitions/LogicItem"
},
"target": {
"type": "string",
"enum": [
"_self",
"_blank",
"_parent",
"_top"
]
},
"anchor": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/Anchor"
}
]
}
},
"required": [
"concept",
"composedBy",
"label",
"description",
"folded",
"offsetX",
"offsetY",
"typeAnnotation",
"link",
"target",
"anchor"
],
"additionalProperties": false,
"description": "跳转到外部链接"
},
"ValidationRule": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "ValidationRule"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"folded": {
"type": [
"null",
"boolean"
]
},
"offsetX": {
"type": [
"null",
"number"
]
},
"offsetY": {
"type": [
"null",
"number"
]
},
"typeAnnotation": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/TypeAnnotation"
}
]
},
"calleeNamespace": {
"type": "string"
},
"calleeName": {
"type": "string"
},
"arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/Argument"
}
},
"errorMessage": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/LogicItem"
}
]
},
"target": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/LogicItem"
}
]
},
"enableServerValidation": {
"type": [
"null",
"boolean"
]
}
},
"required": [
"concept",
"composedBy",
"label",
"description",
"folded",
"offsetX",
"offsetY",
"typeAnnotation",
"calleeNamespace",
"calleeName",
"arguments",
"errorMessage",
"target",
"enableServerValidation"
],
"additionalProperties": false,
"description": "验证规则"
},
"DataSource": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "DataSource"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"entities": {
"type": "array",
"items": {
"$ref": "#/definitions/Entity"
}
},
"ddlStrategy": {
"type": "string",
"enum": [
"all",
"originNotTable",
"none"
]
}
},
"required": [
"concept",
"composedBy",
"name",
"description",
"entities",
"ddlStrategy"
],
"additionalProperties": false,
"description": "数据源"
},
"Entity": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Entity"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"uuid": {
"type": "string"
},
"tableName": {
"type": "string"
},
"description": {
"type": [
"null",
"string"
]
},
"origin": {
"type": "string",
"enum": [
"ide",
"sql",
"table",
"excel"
]
},
"properties": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityProperty"
}
},
"indexes": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityIndex"
}
}
},
"required": [
"concept",
"composedBy",
"name",
"uuid",
"tableName",
"description",
"origin",
"properties",
"indexes"
],
"additionalProperties": false,
"description": "实体"
},
"EntityProperty": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "EntityProperty"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"uuid": {
"type": "string"
},
"columnName": {
"type": "string"
},
"label": {
"type": [
"null",
"string"
]
},
"description": {
"type": [
"null",
"string"
]
},
"typeAnnotation": {
"$ref": "#/definitions/TypeAnnotation"
},
"required": {
"type": [
"null",
"boolean"
]
},
"defaultValue": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/DefaultValue"
}
]
},
"primaryKey": {
"type": [
"null",
"boolean"
]
},
"relationNamespace": {
"type": [
"null",
"string"
]
},
"relationEntity": {
"type": [
"null",
"string"
]
},
"relationProperty": {
"type": [
"null",
"string"
]
},
"deleteRule": {
"type": [
"null",
"string"
],
"enum": [
null,
"protect",
"cascade"
]
},
"display": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
},
"rules": {
"type": "array",
"items": {
"type": "string"
}
},
"generationRule": {
"type": "string",
"enum": [
"auto",
"autoIncrement",
"manual"
]
},
"sequence": {
"type": [
"null",
"string"
]
}
},
"required": [
"concept",
"composedBy",
"name",
"uuid",
"columnName",
"label",
"description",
"typeAnnotation",
"required",
"defaultValue",
"primaryKey",
"relationNamespace",
"relationEntity",
"relationProperty",
"deleteRule",
"display",
"rules",
"generationRule",
"sequence"
],
"additionalProperties": false,
"description": "实体属性"
},
"EntityIndex": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "EntityIndex"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"indexName": {
"type": [
"null",
"string"
]
},
"propertyNames": {
"type": "array",
"items": {
"type": "string"
}
},
"unique": {
"type": "boolean"
},
"description": {
"type": [
"null",
"string"
]
}
},
"required": [
"concept",
"composedBy",
"name",
"indexName",
"propertyNames",
"unique",
"description"
],
"additionalProperties": false,
"description": "实体索引"
},
"Annotatable": {
"anyOf": [
{
"$ref": "#/definitions/Entity"
},
{
"$ref": "#/definitions/View"
},
{
"$ref": "#/definitions/ViewElement"
},
{
"$ref": "#/definitions/Logic"
}
]
},
"View": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "View"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"pageTemplateId": {
"type": [
"null",
"string"
]
},
"name": {
"type": "string"
},
"uuid": {
"type": [
"null",
"string"
]
},
"title": {
"type": "string"
},
"crumb": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/StaticString"
}
]
},
"auth": {
"type": "boolean"
},
"authDescription": {
"type": [
"null",
"string"
]
},
"isIndex": {
"type": [
"null",
"boolean"
]
},
"template": {
"type": [
"null",
"string"
]
},
"script": {
"type": "string"
},
"style": {
"type": [
"null",
"string"
]
},
"elements": {
"type": "array",
"items": {
"$ref": "#/definitions/ViewElement"
}
},
"params": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/Param"
}
}
]
},
"variables": {
"type": "array",
"items": {
"$ref": "#/definitions/Variable"
}
},
"logics": {
"type": "array",
"items": {
"$ref": "#/definitions/Logic"
}
},
"bindEvents": {
"type": "array",
"items": {
"$ref": "#/definitions/BindEvent"
}
},
"bindRoles": {
"type": "array",
"items": {
"type": "string"
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/View"
}
}
},
"required": [
"concept",
"composedBy",
"pageTemplateId",
"name",
"uuid",
"title",
"crumb",
"auth",
"authDescription",
"isIndex",
"template",
"script",
"style",
"elements",
"params",
"variables",
"logics",
"bindEvents",
"bindRoles",
"children"
],
"additionalProperties": false,
"description": "页面"
},
"ViewElement": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "ViewElement"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"tag": {
"type": "string"
},
"refNamespace": {
"type": [
"null",
"string"
]
},
"name": {
"type": "string"
},
"staticClass": {
"type": [
"null",
"string"
]
},
"staticStyle": {
"type": [
"null",
"string"
]
},
"authDescription": {
"type": [
"null",
"string"
]
},
"slotTarget": {
"type": [
"null",
"string"
]
},
"slotScope": {
"type": [
"null",
"string"
]
},
"bindAttrs": {
"type": "array",
"items": {
"$ref": "#/definitions/BindAttribute"
}
},
"bindEvents": {
"type": "array",
"items": {
"$ref": "#/definitions/BindEvent"
}
},
"bindDirectives": {
"type": "array",
"items": {
"$ref": "#/definitions/BindDirective"
}
},
"bindRoles": {
"type": "array",
"items": {
"type": "string"
}
},
"bindStyles": {
"type": "array",
"items": {
"$ref": "#/definitions/BindStyle"
}
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/ViewElement"
}
}
},
"required": [
"concept",
"composedBy",
"tag",
"refNamespace",
"name",
"staticClass",
"staticStyle",
"authDescription",
"slotTarget",
"slotScope",
"bindAttrs",
"bindEvents",
"bindDirectives",
"bindRoles",
"bindStyles",
"children"
],
"additionalProperties": false,
"description": "页面元素"
},
"BindAttribute": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "BindAttribute"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"type": {
"type": [
"null",
"string"
],
"enum": [
null,
"string",
"static",
"dynamic"
]
},
"value": {
"type": [
"null",
"string",
"boolean",
"number"
]
},
"expression": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/LogicItem"
}
]
},
"destination": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/Destination"
}
]
},
"externalDestination": {
"anyOf": [
{
"type": "null"
},
{
"$ref": "#/definitions/ExternalDestination"
}
]
},
"rules": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/ValidationRule"
}
}
]
},
"model": {
"type": [
"null",
"boolean"
]
},
"sync": {
"type": [
"null",
"boolean"
]
},
"playground": {
"type": "array",
"items": {
"$ref": "#/definitions/LogicItem"
}
},
"i18nKey": {
"type": [
"null",
"string"
]
}
},
"required": [
"concept",
"composedBy",
"name",
"type",
"value",
"expression",
"destination",
"externalDestination",
"rules",
"model",
"sync",
"playground",
"i18nKey"
],
"additionalProperties": false,
"description": "元素绑定属性"
},
"BindEvent": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "BindEvent"
},
"composedBy": {
"anyOf": [
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"name": {
"type": "string"
},
"logics": {
"type": "array",
"items": {
"$ref": "#/definitions/Logic"
}
},
"calleeNamespace": {
"type": [
"null",
"string"
]
},
"calleeName": {
"type": [
"null",
"string"