-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathschema.json
144 lines (144 loc) · 6.27 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Schema for JSON files generated by ROSMenuLister.",
"$ref": "#/definitions/Menu",
"definitions": {
"Menu": {
"description": "Represents each menu, including the root menu.",
"type": "object",
"required": ["name", "submenus", "commands"],
"properties": {
"name": {
"description": "Name of the command",
"type": "string"
},
"summary": {
"description": "A summary of the menu, as seen in the list of its parent menu. In the root menu, this contains the RouterOS version, as detected from the pre-prompt screen.",
"type": "string",
"default": ""
},
"description": {
"description": "Description of the menu, as seen in the help for the menu itself, above the list of submenus and commands.",
"type": "string",
"default": ""
},
"submenus": {
"description": "Submenus of this menu.",
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/Menu"
}
},
"commands": {
"description": "Commands in this menu.",
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/Command"
}
}
}
},
"Command": {
"description": "Represents each command.",
"type": "object",
"required": ["name", "arguments"],
"properties": {
"name": {
"description": "Name of this command.",
"type": "string"
},
"summary": {
"description": "A summary of the command, as seen in the help for the menu this command belongs to.",
"type": "string",
"default": ""
},
"description": {
"description": "Description of the command, as seen in the help for the command itself, above the list of arguments.",
"type": "string",
"default": ""
},
"arguments": {
"description": "Arguments that this command may take.",
"type": "array",
"minItems": 0,
"items": {
"$ref": "#/definitions/Argument"
}
}
}
},
"Argument": {
"description": "Represents each command argument.",
"type": "object",
"required": ["name"],
"properties": {
"name": {
"description": "Name of the argument",
"type": "string"
},
"summary": {
"description": "Summary of the argument, as seen in the help for the command this argument belongs to.",
"type": "string",
"default": ""
},
"description": {
"description": "Description of the argument, as seen in the help for the argument itself, above the list of values.",
"type": "string",
"default": ""
},
"unnamed": {
"description": "Specifies whether this argument's name can be omitted when using it from the command line.",
"type": "boolean",
"default": false
},
"special": {
"description": "Specifies whether this argument is not a normal name=value pair argument. This includes empty arguments, for which there won't be a \"values\" property, as well as keywords like \"where\", for which the \"values\" property will describe the possible starting tokens.",
"type": "boolean",
"default": false
},
"values": {
"$ref": "#/definitions/ArgumentValues"
}
}
},
"ArgumentValues": {
"description": "Parsed description of argument values.",
"type": "object",
"properties": {
"raw": {
"description": "Raw unparsed text from console's help, describing the possible values for the argument, or if the argument is a keyword (e.g. \"where\"), describes the first possible token.",
"type": "string",
"default": ""
},
"scriptConstruct": {
"description": "Whether the argument's value affects overall scripting. This value might be a name of a variable to be introduced somewhere (e.g. the counter in \"for\" or the \"name\" of \":local\"), or the value might be an actual script to be executed at a point (e.g. most \"do\" arguments)",
"type": "boolean",
"default": false
},
"negatable": {
"description": "Whether the argument's value can be prefixed with \"!\" to indicate negation.",
"type": "boolean",
"default": false
},
"type": {
"description": "The RouterOS scripting type of this value, if detected.",
"type": "array",
"items": {
"enum": ["(code)", "str", "bool", "num", "time", "ip", "ip-prefix", "ip6", "ip6-prefix"]
},
"uniqueItems": true
},
"enums": {
"description": "The possible values for this argument, if detected.",
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
}
}
}
}