Skip to content

Commit 800ae9a

Browse files
DarhkVoydmabagoury
authored andcommitted
update keywords and schema for hover provider tools
Co-Authored-By: mabagoury <[email protected]>
1 parent e7a037d commit 800ae9a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+839
-267
lines changed

draft-04/schema.js

Lines changed: 105 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
import items from "../lib/keywords/items.js";
2+
import additionalProperties from "../lib/keywords/additionalProperties.js";
3+
import properties from "../lib/keywords/properties.js";
4+
import patternProperties from "../lib/keywords/patternProperties.js";
5+
import allOf from "../lib/keywords/allOf.js";
6+
import anyOf from "../lib/keywords/anyOf.js";
7+
import oneOf from "../lib/keywords/oneOf.js";
8+
import not from "../lib/keywords/not.js";
9+
import typeKeyword from "../lib/keywords/type.js";
10+
import enumKeyword from "../lib/keywords/enum.js";
11+
import pattern from "../lib/keywords/pattern.js";
12+
import minLength from "../lib/keywords/minLength.js";
13+
import maxLength from "../lib/keywords/maxLength.js";
14+
import exclusiveMaximum from "../lib/keywords/exclusiveMaximum.js";
15+
import multipleOf from "../lib/keywords/multipleOf.js";
16+
import exclusiveMinimum from "../lib/keywords/exclusiveMinimum.js";
17+
import maximum from "../lib/keywords/maximum.js";
18+
import minimum from "../lib/keywords/minimum.js";
19+
import maxProperties from "../lib/keywords/maxProperties.js";
20+
import minProperties from "../lib/keywords/minProperties.js";
21+
import required from "../lib/keywords/required.js";
22+
import maxItems from "../lib/keywords/maxItems.js";
23+
import minItems from "../lib/keywords/minItems.js";
24+
import uniqueItems from "../lib/keywords/uniqueItems.js";
25+
import title from "../lib/keywords/title.js";
26+
import description from "../lib/keywords/description.js";
27+
import format from "../lib/keywords/format.js";
28+
29+
130
export default {
231
"id": "http://json-schema.org/draft-04/schema#",
332
"$schema": "http://json-schema.org/draft-04/schema#",
@@ -34,36 +63,50 @@ export default {
3463
"type": "string"
3564
},
3665
"title": {
37-
"type": "string"
66+
"type": "string",
67+
"description": title.description
3868
},
3969
"description": {
40-
"type": "string"
70+
"type": "string",
71+
"description": description.description
4172
},
4273
"default": {},
4374
"multipleOf": {
4475
"type": "number",
4576
"minimum": 0,
46-
"exclusiveMinimum": true
77+
"exclusiveMinimum": true,
78+
"description": multipleOf.description
4779
},
4880
"maximum": {
49-
"type": "number"
81+
"type": "number",
82+
"description": maximum.description
5083
},
5184
"exclusiveMaximum": {
5285
"type": "boolean",
53-
"default": false
86+
"default": false,
87+
"description": exclusiveMaximum.description
5488
},
5589
"minimum": {
56-
"type": "number"
90+
"type": "number",
91+
"description": minimum.description
5792
},
5893
"exclusiveMinimum": {
5994
"type": "boolean",
60-
"default": false
95+
"default": false,
96+
"description": exclusiveMinimum.description
97+
},
98+
"maxLength": {
99+
"allOf": [{ "$ref": "#/definitions/positiveInteger" }],
100+
"description": maxLength.description
101+
},
102+
"minLength": {
103+
"allOf": [{ "$ref": "#/definitions/positiveIntegerDefault0" }],
104+
"description": minLength.description
61105
},
62-
"maxLength": { "$ref": "#/definitions/positiveInteger" },
63-
"minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
64106
"pattern": {
65107
"type": "string",
66-
"format": "regex"
108+
"format": "regex",
109+
"description": pattern.description
67110
},
68111
"additionalItems": {
69112
"anyOf": [
@@ -77,23 +120,42 @@ export default {
77120
{ "$ref": "#" },
78121
{ "$ref": "#/definitions/schemaArray" }
79122
],
80-
"default": {}
123+
"default": {},
124+
"description": items.description
125+
},
126+
"maxItems": {
127+
"allOf": [{ "$ref": "#/definitions/positiveInteger" }],
128+
"description": maxItems.description
129+
},
130+
"minItems": {
131+
"allOf": [{ "$ref": "#/definitions/positiveIntegerDefault0" }],
132+
"description": minItems.description
81133
},
82-
"maxItems": { "$ref": "#/definitions/positiveInteger" },
83-
"minItems": { "$ref": "#/definitions/positiveIntegerDefault0" },
84134
"uniqueItems": {
85135
"type": "boolean",
86-
"default": false
136+
"default": false,
137+
"description": uniqueItems.description
138+
},
139+
"maxProperties": {
140+
"allOf": [{ "$ref": "#/definitions/positiveIntegerDefault0" }],
141+
"$ref": "#/definitions/positiveInteger",
142+
"description": maxProperties.description
143+
},
144+
"minProperties": {
145+
"allOf": [{ "$ref": "#/definitions/positiveIntegerDefault0" }],
146+
"description": minProperties.description
147+
},
148+
"required": {
149+
"allOf": [{ "$ref": "#/definitions/stringArray" }],
150+
"description": required.description
87151
},
88-
"maxProperties": { "$ref": "#/definitions/positiveInteger" },
89-
"minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
90-
"required": { "$ref": "#/definitions/stringArray" },
91152
"additionalProperties": {
92153
"anyOf": [
93154
{ "type": "boolean" },
94155
{ "$ref": "#" }
95156
],
96-
"default": {}
157+
"default": {},
158+
"description": additionalProperties.description
97159
},
98160
"definitions": {
99161
"type": "object",
@@ -103,12 +165,14 @@ export default {
103165
"properties": {
104166
"type": "object",
105167
"additionalProperties": { "$ref": "#" },
106-
"default": {}
168+
"default": {},
169+
"description": properties.description
107170
},
108171
"patternProperties": {
109172
"type": "object",
110173
"additionalProperties": { "$ref": "#" },
111-
"default": {}
174+
"default": {},
175+
"description": patternProperties.description
112176
},
113177
"dependencies": {
114178
"type": "object",
@@ -122,7 +186,8 @@ export default {
122186
"enum": {
123187
"type": "array",
124188
"minItems": 1,
125-
"uniqueItems": true
189+
"uniqueItems": true,
190+
"description": enumKeyword.description
126191
},
127192
"type": {
128193
"anyOf": [
@@ -133,13 +198,26 @@ export default {
133198
"minItems": 1,
134199
"uniqueItems": true
135200
}
136-
]
201+
],
202+
"description": typeKeyword.description
203+
},
204+
"format": { "type": "string", "description": format.description },
205+
"allOf": {
206+
"allOf": [{ "$ref": "#/definitions/schemaArray" }],
207+
"description": allOf.description
208+
},
209+
"anyOf": {
210+
"anyOf": [{ "$ref": "#/definitions/schemaArray" }],
211+
"description": anyOf.description
137212
},
138-
"format": { "type": "string" },
139-
"allOf": { "$ref": "#/definitions/schemaArray" },
140-
"anyOf": { "$ref": "#/definitions/schemaArray" },
141-
"oneOf": { "$ref": "#/definitions/schemaArray" },
142-
"not": { "$ref": "#" }
213+
"oneOf": {
214+
"oneOf": [{ "$ref": "#/definitions/schemaArray" }],
215+
"description": oneOf.description
216+
},
217+
"not": {
218+
"allOf": [{ "$ref": "#" }],
219+
"description": not.description
220+
}
143221
},
144222
"dependencies": {
145223
"exclusiveMaximum": ["maximum"],

0 commit comments

Comments
 (0)