-
Notifications
You must be signed in to change notification settings - Fork 106
/
customData.schema.json
205 lines (205 loc) · 6.19 KB
/
customData.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
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "vscode-html-customdata",
"version": 1.1,
"title": "VS Code HTML Custom Data format",
"description": "Format for loading Custom Data in VS Code's HTML support",
"type": "object",
"required": ["version"],
"definitions": {
"references": {
"type": "object",
"required": ["name", "url"],
"properties": {
"name": {
"type": "string",
"description": "The name of the reference."
},
"url": {
"type": "string",
"description": "The URL of the reference.",
"pattern": "https?:\/\/",
"patternErrorMessage": "URL should start with http:// or https://"
}
}
},
"markupDescription": {
"type": "object",
"required": ["kind", "value"],
"properties": {
"kind": {
"type": "string",
"description": "Whether `description.value` should be rendered as plaintext or markdown",
"enum": [
"plaintext",
"markdown"
]
},
"value": {
"type": "string",
"description": "Description shown in completion and hover"
}
}
}
},
"properties": {
"version": {
"const": 1.1,
"description": "The custom data version",
"type": "number"
},
"tags": {
"description": "Custom HTML tags",
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"attributes": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of tag"
},
"description": {
"description": "Description of tag shown in completion and hover",
"anyOf": [
{
"type": "string"
},
{ "$ref": "#/definitions/markupDescription" }
]
},
"attributes": {
"type": "array",
"description": "A list of possible attributes for the tag",
"items": {
"type": "object",
"required": ["name"],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"values": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute"
},
"description": {
"description": "Description of attribute shown in completion and hover",
"anyOf": [
{
"type": "string"
},
{ "$ref": "#/definitions/markupDescription" }
]
},
"valueSet": {
"type": "string",
"description": "Name of the matching attribute value set"
},
"values": {
"type": "array",
"description": "A list of possible values for the attribute",
"items": {
"type": "object",
"required": ["name"],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": ""
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute value"
},
"description": {
"description": "Description of attribute value shown in completion and hover",
"anyOf": [
{
"type": "string"
},
{ "$ref": "#/definitions/markupDescription" }
]
},
"references": {
"type": "array",
"description": "A list of references for the attribute value shown in completion and hover",
"items": {
"$ref": "#/definitions/references"
}
}
}
}
},
"references": {
"type": "array",
"description": "A list of references for the attribute shown in completion and hover",
"items": {
"$ref": "#/definitions/references"
}
}
}
}
},
"references": {
"type": "array",
"description": "A list of references for the tag shown in completion and hover",
"items": {
"$ref": "#/definitions/references"
}
}
}
}
},
"globalAttributes": {
"description": "Custom HTML global attributes",
"type": "array",
"items": {
"$ref": "#/properties/tags/items/properties/attributes/items"
}
},
"valueSets": {
"description": "A set of attribute value. When an attribute refers to an attribute set, its value completion will use value from that set",
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"values": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute value in value set"
},
"values": {
"$ref": "#/properties/tags/items/properties/attributes/items/properties/values"
}
}
}
}
}
}