-
Notifications
You must be signed in to change notification settings - Fork 391
/
Copy pathinterface.schema.json
256 lines (256 loc) · 8 KB
/
interface.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
{
"$schema": "https://json-schema.org/draft/2020-12/schema#",
"type": "object",
"properties": {
"jsonrpc": {
"description": "Version of the json-rpc protocol.",
"type": "string",
"enum": [
"2.0"
]
},
"info": {
"description": "Meta information about the interface.",
"type": "object",
"properties": {
"title": {
"description": "Pretty name of the interface.",
"type": "string"
},
"class": {
"description": "Class name of interface",
"type": "string"
},
"description": {
"description": "Description of the interface",
"type": "string"
},
"deprecated": {
"description": "Value is set as true if plugin is deprecated",
"type": "boolean"
},
"referencePluginUrl": {
"description": "Provides the alternate plugin for the deprecated plugin",
"type": "string"
}
},
"required": [
"class"
]
},
"definitions": {
"description": "Global definitions for use in the spec.",
"type": "object"
},
"common": {
"description": "Common definitions for use in the spec.",
"type": "object"
},
"include": {
"description": "Interfaces to include",
"type": "object"
},
"methods": {
"description": "Definitions of the available procedures in the API. A key equals to the name of a procedure.",
"type": "object",
"patternProperties": {
"^.*$": {
"description": "Definition of an API procedure.",
"type": "object",
"properties": {
"summary": {
"description": "Short summary of what the procedure does.",
"type": "string"
},
"referenceUrl":{
"description": "Provides the alternate api for the deprecated api",
"type": "string"
},
"description": {
"description": "Longer description of what the procedure does.",
"type": "string"
},
"params": {
"description": "JSON-Schema of the procedure parameters.",
"type": "object",
"$ref": "https://json-schema.org/draft/2020-12/schema#"
},
"result": {
"description": "JSON-Schema of the procedure result.",
"type": "object",
"$ref": "https://json-schema.org/draft/2020-12/schema#"
},
"events": {
"description": "Events related.",
"type": "array",
"items": {
"description": "Event.",
"type": "string"
}
},
"errors": {
"description": "Definition of possible error responses.",
"type": "array",
"items": {
"description": "Definition of an error response.",
"type": "object",
"properties": {
"description": {
"description": "Description of the failure.",
"type": "string"
},
"code": {
"description": "Error code.",
"type": "number"
},
"message": {
"description": "Error message.",
"type": "string"
}
},
"required": [
"code",
"message"
]
}
}
},
"required": [
"summary"
]
}
}
},
"properties": {
"description": "Definitions of the available properties in the API. A key equals to the name of a property.",
"type": "object",
"patternProperties": {
"^.*$": {
"description": "Definition of an API property.",
"type": "object",
"properties": {
"summary": {
"description": "Short summary of the property.",
"type": "string"
},
"description": {
"description": "Longer description of the property.",
"type": "string"
},
"readonly": {
"description": "Denotes if the property is read-only.",
"type": "boolean"
},
"writeonly": {
"description": "Denotes if the property is write-only.",
"type": "boolean"
},
"index": {
"description": "Specifies if the property needs an index (child property).",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the ID."
},
"example": {
"type": "string",
"description": "ID example."
}
}
},
"params": {
"description": "JSON-Schema of the property value.",
"type": "object",
"$ref": "https://json-schema.org/draft/2020-12/schema#"
},
"events": {
"description": "Events related.",
"type": "array",
"items": {
"description": "Event.",
"type": "string"
}
},
"errors": {
"description": "Definition of possible error responses.",
"type": "array",
"items": {
"description": "Definition of an error response.",
"type": "object",
"properties": {
"description": {
"description": "Description of the failure.",
"type": "string"
},
"code": {
"description": "Error code.",
"type": "number"
},
"message": {
"description": "Error message.",
"type": "string"
}
},
"required": [
"code",
"message"
]
}
}
},
"required": [
"summary",
"value"
]
}
}
},
"events": {
"description": "Definitions of the available events. A key equals to the name of the event.",
"type": "object",
"patternProperties": {
"^.*$": {
"description": "Definition of an event.",
"type": "object",
"properties": {
"summary": {
"description": "Short summary of the event.",
"type": "string"
},
"description": {
"description": "Longer description of the event.",
"type": "string"
},
"id": {
"description": "Specifies if sending the notification is conditional.",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the ID."
},
"example": {
"type": "string",
"description": "ID example."
}
}
},
"params": {
"description": "JSON-Schema of the event params.",
"type": "object",
"$ref": "https://json-schema.org/draft/2020-12/schema#"
}
},
"required": [
"summary"
]
}
}
}
},
"required": [
"jsonrpc",
"info"
]
}