UNPKG

21.8 kBJSONView Raw
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "definitions": {
4 "AndType": {
5 "additionalProperties": false,
6 "description": "Represents an `and`type (e.g. TextDocumentParams & WorkDoneProgressParams`).",
7 "properties": {
8 "items": {
9 "items": {
10 "$ref": "#/definitions/Type"
11 },
12 "type": "array"
13 },
14 "kind": {
15 "const": "and",
16 "type": "string"
17 }
18 },
19 "required": [
20 "kind",
21 "items"
22 ],
23 "type": "object"
24 },
25 "ArrayType": {
26 "additionalProperties": false,
27 "description": "Represents an array type (e.g. `TextDocument[]`).",
28 "properties": {
29 "element": {
30 "$ref": "#/definitions/Type"
31 },
32 "kind": {
33 "const": "array",
34 "type": "string"
35 }
36 },
37 "required": [
38 "kind",
39 "element"
40 ],
41 "type": "object"
42 },
43 "BaseType": {
44 "additionalProperties": false,
45 "description": "Represents a base type like `string` or `DocumentUri`.",
46 "properties": {
47 "kind": {
48 "const": "base",
49 "type": "string"
50 },
51 "name": {
52 "$ref": "#/definitions/BaseTypes"
53 }
54 },
55 "required": [
56 "kind",
57 "name"
58 ],
59 "type": "object"
60 },
61 "BaseTypes": {
62 "enum": [
63 "URI",
64 "DocumentUri",
65 "integer",
66 "uinteger",
67 "decimal",
68 "RegExp",
69 "string",
70 "boolean",
71 "null"
72 ],
73 "type": "string"
74 },
75 "BooleanLiteralType": {
76 "additionalProperties": false,
77 "description": "Represents a boolean literal type (e.g. `kind: true`).",
78 "properties": {
79 "kind": {
80 "const": "booleanLiteral",
81 "type": "string"
82 },
83 "value": {
84 "type": "boolean"
85 }
86 },
87 "required": [
88 "kind",
89 "value"
90 ],
91 "type": "object"
92 },
93 "Enumeration": {
94 "additionalProperties": false,
95 "description": "Defines an enumeration.",
96 "properties": {
97 "deprecated": {
98 "description": "Whether the enumeration is deprecated or not. If deprecated the property contains the deprecation message.",
99 "type": "string"
100 },
101 "documentation": {
102 "description": "An optional documentation.",
103 "type": "string"
104 },
105 "name": {
106 "description": "The name of the enumeration.",
107 "type": "string"
108 },
109 "proposed": {
110 "description": "Whether this is a proposed enumeration. If omitted, the enumeration is final.",
111 "type": "boolean"
112 },
113 "since": {
114 "description": "Since when (release number) this enumeration is available. Is undefined if not known.",
115 "type": "string"
116 },
117 "supportsCustomValues": {
118 "description": "Whether the enumeration supports custom values (e.g. values which are not part of the set defined in `values`). If omitted no custom values are supported.",
119 "type": "boolean"
120 },
121 "type": {
122 "$ref": "#/definitions/EnumerationType",
123 "description": "The type of the elements."
124 },
125 "values": {
126 "description": "The enum values.",
127 "items": {
128 "$ref": "#/definitions/EnumerationEntry"
129 },
130 "type": "array"
131 }
132 },
133 "required": [
134 "name",
135 "type",
136 "values"
137 ],
138 "type": "object"
139 },
140 "EnumerationEntry": {
141 "additionalProperties": false,
142 "description": "Defines an enumeration entry.",
143 "properties": {
144 "deprecated": {
145 "description": "Whether the enum entry is deprecated or not. If deprecated the property contains the deprecation message.",
146 "type": "string"
147 },
148 "documentation": {
149 "description": "An optional documentation.",
150 "type": "string"
151 },
152 "name": {
153 "description": "The name of the enum item.",
154 "type": "string"
155 },
156 "proposed": {
157 "description": "Whether this is a proposed enumeration entry. If omitted, the enumeration entry is final.",
158 "type": "boolean"
159 },
160 "since": {
161 "description": "Since when (release number) this enumeration entry is available. Is undefined if not known.",
162 "type": "string"
163 },
164 "value": {
165 "description": "The value.",
166 "type": [
167 "string",
168 "number"
169 ]
170 }
171 },
172 "required": [
173 "name",
174 "value"
175 ],
176 "type": "object"
177 },
178 "EnumerationType": {
179 "additionalProperties": false,
180 "properties": {
181 "kind": {
182 "const": "base",
183 "type": "string"
184 },
185 "name": {
186 "enum": [
187 "string",
188 "integer",
189 "uinteger"
190 ],
191 "type": "string"
192 }
193 },
194 "required": [
195 "kind",
196 "name"
197 ],
198 "type": "object"
199 },
200 "IntegerLiteralType": {
201 "additionalProperties": false,
202 "properties": {
203 "kind": {
204 "const": "integerLiteral",
205 "description": "Represents an integer literal type (e.g. `kind: 1`).",
206 "type": "string"
207 },
208 "value": {
209 "type": "number"
210 }
211 },
212 "required": [
213 "kind",
214 "value"
215 ],
216 "type": "object"
217 },
218 "MapKeyType": {
219 "anyOf": [
220 {
221 "additionalProperties": false,
222 "properties": {
223 "kind": {
224 "const": "base",
225 "type": "string"
226 },
227 "name": {
228 "enum": [
229 "URI",
230 "DocumentUri",
231 "string",
232 "integer"
233 ],
234 "type": "string"
235 }
236 },
237 "required": [
238 "kind",
239 "name"
240 ],
241 "type": "object"
242 },
243 {
244 "$ref": "#/definitions/ReferenceType"
245 }
246 ],
247 "description": "Represents a type that can be used as a key in a map type. If a reference type is used then the type must either resolve to a `string` or `integer` type. (e.g. `type ChangeAnnotationIdentifier === string`)."
248 },
249 "MapType": {
250 "additionalProperties": false,
251 "description": "Represents a JSON object map (e.g. `interface Map<K extends string | integer, V> { [key: K] => V; }`).",
252 "properties": {
253 "key": {
254 "$ref": "#/definitions/MapKeyType"
255 },
256 "kind": {
257 "const": "map",
258 "type": "string"
259 },
260 "value": {
261 "$ref": "#/definitions/Type"
262 }
263 },
264 "required": [
265 "kind",
266 "key",
267 "value"
268 ],
269 "type": "object"
270 },
271 "MessageDirection": {
272 "description": "Indicates in which direction a message is sent in the protocol.",
273 "enum": [
274 "clientToServer",
275 "serverToClient",
276 "both"
277 ],
278 "type": "string"
279 },
280 "MetaData": {
281 "additionalProperties": false,
282 "properties": {
283 "version": {
284 "description": "The protocol version.",
285 "type": "string"
286 }
287 },
288 "required": [
289 "version"
290 ],
291 "type": "object"
292 },
293 "MetaModel": {
294 "additionalProperties": false,
295 "description": "The actual meta model.",
296 "properties": {
297 "enumerations": {
298 "description": "The enumerations.",
299 "items": {
300 "$ref": "#/definitions/Enumeration"
301 },
302 "type": "array"
303 },
304 "metaData": {
305 "$ref": "#/definitions/MetaData",
306 "description": "Additional meta data."
307 },
308 "notifications": {
309 "description": "The notifications.",
310 "items": {
311 "$ref": "#/definitions/Notification"
312 },
313 "type": "array"
314 },
315 "requests": {
316 "description": "The requests.",
317 "items": {
318 "$ref": "#/definitions/Request"
319 },
320 "type": "array"
321 },
322 "structures": {
323 "description": "The structures.",
324 "items": {
325 "$ref": "#/definitions/Structure"
326 },
327 "type": "array"
328 },
329 "typeAliases": {
330 "description": "The type aliases.",
331 "items": {
332 "$ref": "#/definitions/TypeAlias"
333 },
334 "type": "array"
335 }
336 },
337 "required": [
338 "metaData",
339 "requests",
340 "notifications",
341 "structures",
342 "enumerations",
343 "typeAliases"
344 ],
345 "type": "object"
346 },
347 "Notification": {
348 "additionalProperties": false,
349 "description": "Represents a LSP notification",
350 "properties": {
351 "deprecated": {
352 "description": "Whether the notification is deprecated or not. If deprecated the property contains the deprecation message.",
353 "type": "string"
354 },
355 "documentation": {
356 "description": "An optional documentation;",
357 "type": "string"
358 },
359 "messageDirection": {
360 "$ref": "#/definitions/MessageDirection",
361 "description": "The direction in which this notification is sent in the protocol."
362 },
363 "method": {
364 "description": "The request's method name.",
365 "type": "string"
366 },
367 "params": {
368 "anyOf": [
369 {
370 "$ref": "#/definitions/Type"
371 },
372 {
373 "items": {
374 "$ref": "#/definitions/Type"
375 },
376 "type": "array"
377 }
378 ],
379 "description": "The parameter type(s) if any."
380 },
381 "proposed": {
382 "description": "Whether this is a proposed notification. If omitted the notification is final.",
383 "type": "boolean"
384 },
385 "registrationMethod": {
386 "description": "Optional a dynamic registration method if it different from the request's method.",
387 "type": "string"
388 },
389 "registrationOptions": {
390 "$ref": "#/definitions/Type",
391 "description": "Optional registration options if the notification supports dynamic registration."
392 },
393 "since": {
394 "description": "Since when (release number) this notification is available. Is undefined if not known.",
395 "type": "string"
396 }
397 },
398 "required": [
399 "method",
400 "messageDirection"
401 ],
402 "type": "object"
403 },
404 "OrType": {
405 "additionalProperties": false,
406 "description": "Represents an `or` type (e.g. `Location | LocationLink`).",
407 "properties": {
408 "items": {
409 "items": {
410 "$ref": "#/definitions/Type"
411 },
412 "type": "array"
413 },
414 "kind": {
415 "const": "or",
416 "type": "string"
417 }
418 },
419 "required": [
420 "kind",
421 "items"
422 ],
423 "type": "object"
424 },
425 "Property": {
426 "additionalProperties": false,
427 "description": "Represents an object property.",
428 "properties": {
429 "deprecated": {
430 "description": "Whether the property is deprecated or not. If deprecated the property contains the deprecation message.",
431 "type": "string"
432 },
433 "documentation": {
434 "description": "An optional documentation.",
435 "type": "string"
436 },
437 "name": {
438 "description": "The property name;",
439 "type": "string"
440 },
441 "optional": {
442 "description": "Whether the property is optional. If omitted, the property is mandatory.",
443 "type": "boolean"
444 },
445 "proposed": {
446 "description": "Whether this is a proposed property. If omitted, the structure is final.",
447 "type": "boolean"
448 },
449 "since": {
450 "description": "Since when (release number) this property is available. Is undefined if not known.",
451 "type": "string"
452 },
453 "type": {
454 "$ref": "#/definitions/Type",
455 "description": "The type of the property"
456 }
457 },
458 "required": [
459 "name",
460 "type"
461 ],
462 "type": "object"
463 },
464 "ReferenceType": {
465 "additionalProperties": false,
466 "description": "Represents a reference to another type (e.g. `TextDocument`). This is either a `Structure`, a `Enumeration` or a `TypeAlias` in the same meta model.",
467 "properties": {
468 "kind": {
469 "const": "reference",
470 "type": "string"
471 },
472 "name": {
473 "type": "string"
474 }
475 },
476 "required": [
477 "kind",
478 "name"
479 ],
480 "type": "object"
481 },
482 "Request": {
483 "additionalProperties": false,
484 "description": "Represents a LSP request",
485 "properties": {
486 "deprecated": {
487 "description": "Whether the request is deprecated or not. If deprecated the property contains the deprecation message.",
488 "type": "string"
489 },
490 "documentation": {
491 "description": "An optional documentation;",
492 "type": "string"
493 },
494 "errorData": {
495 "$ref": "#/definitions/Type",
496 "description": "An optional error data type."
497 },
498 "messageDirection": {
499 "$ref": "#/definitions/MessageDirection",
500 "description": "The direction in which this request is sent in the protocol."
501 },
502 "method": {
503 "description": "The request's method name.",
504 "type": "string"
505 },
506 "params": {
507 "anyOf": [
508 {
509 "$ref": "#/definitions/Type"
510 },
511 {
512 "items": {
513 "$ref": "#/definitions/Type"
514 },
515 "type": "array"
516 }
517 ],
518 "description": "The parameter type(s) if any."
519 },
520 "partialResult": {
521 "$ref": "#/definitions/Type",
522 "description": "Optional partial result type if the request supports partial result reporting."
523 },
524 "proposed": {
525 "description": "Whether this is a proposed feature. If omitted the feature is final.",
526 "type": "boolean"
527 },
528 "registrationMethod": {
529 "description": "Optional a dynamic registration method if it different from the request's method.",
530 "type": "string"
531 },
532 "registrationOptions": {
533 "$ref": "#/definitions/Type",
534 "description": "Optional registration options if the request supports dynamic registration."
535 },
536 "result": {
537 "$ref": "#/definitions/Type",
538 "description": "The result type."
539 },
540 "since": {
541 "description": "Since when (release number) this request is available. Is undefined if not known.",
542 "type": "string"
543 }
544 },
545 "required": [
546 "method",
547 "result",
548 "messageDirection"
549 ],
550 "type": "object"
551 },
552 "StringLiteralType": {
553 "additionalProperties": false,
554 "description": "Represents a string literal type (e.g. `kind: 'rename'`).",
555 "properties": {
556 "kind": {
557 "const": "stringLiteral",
558 "type": "string"
559 },
560 "value": {
561 "type": "string"
562 }
563 },
564 "required": [
565 "kind",
566 "value"
567 ],
568 "type": "object"
569 },
570 "Structure": {
571 "additionalProperties": false,
572 "description": "Defines the structure of an object literal.",
573 "properties": {
574 "deprecated": {
575 "description": "Whether the structure is deprecated or not. If deprecated the property contains the deprecation message.",
576 "type": "string"
577 },
578 "documentation": {
579 "description": "An optional documentation;",
580 "type": "string"
581 },
582 "extends": {
583 "description": "Structures extended from. This structures form a polymorphic type hierarchy.",
584 "items": {
585 "$ref": "#/definitions/Type"
586 },
587 "type": "array"
588 },
589 "mixins": {
590 "description": "Structures to mix in. The properties of these structures are `copied` into this structure. Mixins don't form a polymorphic type hierarchy in LSP.",
591 "items": {
592 "$ref": "#/definitions/Type"
593 },
594 "type": "array"
595 },
596 "name": {
597 "description": "The name of the structure.",
598 "type": "string"
599 },
600 "properties": {
601 "description": "The properties.",
602 "items": {
603 "$ref": "#/definitions/Property"
604 },
605 "type": "array"
606 },
607 "proposed": {
608 "description": "Whether this is a proposed structure. If omitted, the structure is final.",
609 "type": "boolean"
610 },
611 "since": {
612 "description": "Since when (release number) this structure is available. Is undefined if not known.",
613 "type": "string"
614 }
615 },
616 "required": [
617 "name",
618 "properties"
619 ],
620 "type": "object"
621 },
622 "StructureLiteral": {
623 "additionalProperties": false,
624 "description": "Defines an unnamed structure of an object literal.",
625 "properties": {
626 "deprecated": {
627 "description": "Whether the literal is deprecated or not. If deprecated the property contains the deprecation message.",
628 "type": "string"
629 },
630 "documentation": {
631 "description": "An optional documentation.",
632 "type": "string"
633 },
634 "properties": {
635 "description": "The properties.",
636 "items": {
637 "$ref": "#/definitions/Property"
638 },
639 "type": "array"
640 },
641 "proposed": {
642 "description": "Whether this is a proposed structure. If omitted, the structure is final.",
643 "type": "boolean"
644 },
645 "since": {
646 "description": "Since when (release number) this structure is available. Is undefined if not known.",
647 "type": "string"
648 }
649 },
650 "required": [
651 "properties"
652 ],
653 "type": "object"
654 },
655 "StructureLiteralType": {
656 "additionalProperties": false,
657 "description": "Represents a literal structure (e.g. `property: { start: uinteger; end: uinteger; }`).",
658 "properties": {
659 "kind": {
660 "const": "literal",
661 "type": "string"
662 },
663 "value": {
664 "$ref": "#/definitions/StructureLiteral"
665 }
666 },
667 "required": [
668 "kind",
669 "value"
670 ],
671 "type": "object"
672 },
673 "TupleType": {
674 "additionalProperties": false,
675 "description": "Represents a `tuple` type (e.g. `[integer, integer]`).",
676 "properties": {
677 "items": {
678 "items": {
679 "$ref": "#/definitions/Type"
680 },
681 "type": "array"
682 },
683 "kind": {
684 "const": "tuple",
685 "type": "string"
686 }
687 },
688 "required": [
689 "kind",
690 "items"
691 ],
692 "type": "object"
693 },
694 "Type": {
695 "anyOf": [
696 {
697 "$ref": "#/definitions/BaseType"
698 },
699 {
700 "$ref": "#/definitions/ReferenceType"
701 },
702 {
703 "$ref": "#/definitions/ArrayType"
704 },
705 {
706 "$ref": "#/definitions/MapType"
707 },
708 {
709 "$ref": "#/definitions/AndType"
710 },
711 {
712 "$ref": "#/definitions/OrType"
713 },
714 {
715 "$ref": "#/definitions/TupleType"
716 },
717 {
718 "$ref": "#/definitions/StructureLiteralType"
719 },
720 {
721 "$ref": "#/definitions/StringLiteralType"
722 },
723 {
724 "$ref": "#/definitions/IntegerLiteralType"
725 },
726 {
727 "$ref": "#/definitions/BooleanLiteralType"
728 }
729 ]
730 },
731 "TypeAlias": {
732 "additionalProperties": false,
733 "description": "Defines a type alias. (e.g. `type Definition = Location | LocationLink`)",
734 "properties": {
735 "deprecated": {
736 "description": "Whether the type alias is deprecated or not. If deprecated the property contains the deprecation message.",
737 "type": "string"
738 },
739 "documentation": {
740 "description": "An optional documentation.",
741 "type": "string"
742 },
743 "name": {
744 "description": "The name of the type alias.",
745 "type": "string"
746 },
747 "proposed": {
748 "description": "Whether this is a proposed type alias. If omitted, the type alias is final.",
749 "type": "boolean"
750 },
751 "since": {
752 "description": "Since when (release number) this structure is available. Is undefined if not known.",
753 "type": "string"
754 },
755 "type": {
756 "$ref": "#/definitions/Type",
757 "description": "The aliased type."
758 }
759 },
760 "required": [
761 "name",
762 "type"
763 ],
764 "type": "object"
765 },
766 "TypeKind": {
767 "enum": [
768 "base",
769 "reference",
770 "array",
771 "map",
772 "and",
773 "or",
774 "tuple",
775 "literal",
776 "stringLiteral",
777 "integerLiteral",
778 "booleanLiteral"
779 ],
780 "type": "string"
781 }
782 }
783}