-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtombi.schema.json
353 lines (353 loc) · 8.78 KB
/
tombi.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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
{
"$id": "https://json.schemastore.org/tombi.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Tombi",
"description": "**Tombi** (鳶) is a toolkit for TOML; providing a formatter/linter and language server.\n See the [GitHub repository](https://github.com/tombi-toml/tombi) for more information.",
"type": "object",
"properties": {
"format": {
"title": "Formatter options.",
"anyOf": [
{
"$ref": "#/definitions/FormatOptions"
},
{
"type": "null"
}
]
},
"toml-version": {
"title": "TOML version.",
"description": "TOML version to use if not specified in the schema.",
"anyOf": [
{
"$ref": "#/definitions/TomlVersion"
},
{
"type": "null"
}
],
"default": "v1.0.0"
},
"lint": {
"title": "Linter options.",
"anyOf": [
{
"$ref": "#/definitions/LintOptions"
},
{
"type": "null"
}
]
},
"server": {
"title": "Language server options.",
"anyOf": [
{
"$ref": "#/definitions/ServerOptions"
},
{
"type": "null"
}
]
},
"schema": {
"title": "Schema options.",
"anyOf": [
{
"$ref": "#/definitions/SchemaOptions"
},
{
"type": "null"
}
]
},
"schemas": {
"title": "Schema catalog items.",
"type": ["array", "null"],
"items": {
"$ref": "#/definitions/SchemaCatalogItem"
}
}
},
"additionalProperties": false,
"x-tombi-toml-version": "v1.1.0-preview",
"definitions": {
"TomlVersion": {
"title": "TOML version.",
"type": "string",
"enum": ["v1.0.0", "v1.1.0-preview"]
},
"FormatOptions": {
"title": "Formatter options.",
"description": "To avoid needless discussion of formatting rules,\n we do not currently have a configuration item for formatting.",
"type": "object",
"additionalProperties": false
},
"LintOptions": {
"type": "object",
"additionalProperties": false
},
"ServerOptions": {
"title": "Language Server options.",
"type": "object",
"properties": {
"hover": {
"title": "Hover Feature options.",
"anyOf": [
{
"$ref": "#/definitions/ServerHover"
},
{
"type": "null"
}
]
},
"completion": {
"title": "Completion Feature options.",
"anyOf": [
{
"$ref": "#/definitions/ServerCompletion"
},
{
"type": "null"
}
]
},
"formatting": {
"title": "Formatting Feature options.",
"anyOf": [
{
"$ref": "#/definitions/ServerFormatting"
},
{
"type": "null"
}
]
},
"diagnostics": {
"title": "Diagnostics Feature options.",
"anyOf": [
{
"$ref": "#/definitions/ServerDiagnostics"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"ServerHover": {
"type": "object",
"properties": {
"enabled": {
"title": "Enable hover feature.",
"description": "Whether to enable hover.",
"anyOf": [
{
"$ref": "#/definitions/Enabled"
},
{
"type": "null"
}
],
"default": true
}
},
"additionalProperties": false
},
"Enabled": {
"type": "boolean"
},
"ServerCompletion": {
"type": "object",
"properties": {
"enabled": {
"title": "Enable completion feature.",
"description": "Whether to enable completion.\n\n **WARNING**: 🚧 This feature is experimental 🚧",
"anyOf": [
{
"$ref": "#/definitions/Enabled"
},
{
"type": "null"
}
],
"default": true
}
},
"additionalProperties": false
},
"ServerFormatting": {
"type": "object",
"properties": {
"enabled": {
"title": "Enable formatting feature.",
"description": "Whether to enable formatting.",
"anyOf": [
{
"$ref": "#/definitions/Enabled"
},
{
"type": "null"
}
],
"default": true
}
},
"additionalProperties": false
},
"ServerDiagnostics": {
"type": "object",
"properties": {
"enabled": {
"title": "Enable diagnostics feature.",
"description": "Whether to enable diagnostics.",
"anyOf": [
{
"$ref": "#/definitions/Enabled"
},
{
"type": "null"
}
],
"default": true
}
},
"additionalProperties": false
},
"SchemaOptions": {
"type": "object",
"properties": {
"enabled": {
"title": "Enable or disable the schema.",
"anyOf": [
{
"$ref": "#/definitions/Enabled"
},
{
"type": "null"
}
],
"default": true
},
"catalog": {
"title": "Schema catalog options.",
"anyOf": [
{
"$ref": "#/definitions/SchemaCatalog"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"SchemaCatalog": {
"type": "object",
"properties": {
"path": {
"title": "The schema catalog path or url.",
"description": "The catalog is evaluated after the schemas specified by [[schemas]].\n\n You can specify multiple catalogs by making it an array.\n If you specify an array, the catalogs are searched in order of priority starting from the first catalog.\n If you want to disable the default catalog, specify an empty array.",
"anyOf": [
{
"$ref": "#/definitions/OneOrMany_for_SchemaCatalogPath"
},
{
"type": "null"
}
],
"default": "https://www.schemastore.org/api/json/catalog.json"
}
},
"additionalProperties": false
},
"OneOrMany_for_SchemaCatalogPath": {
"anyOf": [
{
"$ref": "#/definitions/SchemaCatalogPath"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/SchemaCatalogPath"
}
}
]
},
"SchemaCatalogPath": {
"description": "Generic value that can be either single or multiple",
"type": "string"
},
"SchemaCatalogItem": {
"anyOf": [
{
"$ref": "#/definitions/RootSchemaCatalogItem"
},
{
"$ref": "#/definitions/SubSchemaCatalogItem"
}
]
},
"RootSchemaCatalogItem": {
"type": "object",
"properties": {
"toml-version": {
"title": "The TOML version that the schema is available.",
"anyOf": [
{
"$ref": "#/definitions/TomlVersion"
},
{
"type": "null"
}
]
},
"path": {
"title": "The schema path.",
"type": "string"
},
"include": {
"title": "The file match pattern of the schema.",
"description": "The file match pattern to include the target to apply the schema.\n Supports glob pattern.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"additionalProperties": false,
"required": ["path", "include"]
},
"SubSchemaCatalogItem": {
"type": "object",
"properties": {
"path": {
"title": "The schema path.",
"type": "string"
},
"include": {
"title": "The file match pattern of the schema.",
"description": "The file match pattern to include the target to apply the schema.\n Supports glob pattern.",
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"root-keys": {
"title": "The key to apply the schema as the root.",
"type": ["string", "null"],
"minLength": 1
}
},
"additionalProperties": false,
"required": ["path", "include"]
}
}
}