@hia-doc/htmdoc-spec 0.1.0 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,252 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://mandolin.github.io/HIA-Documentation/schemas/hia-htmdoc-extraction-1.0.0.schema.json",
4
+ "type": "object",
5
+ "required": [
6
+ "contract",
7
+ "contractVersion",
8
+ "producer",
9
+ "profile",
10
+ "source",
11
+ "symbols",
12
+ "annotations",
13
+ "diagnostics",
14
+ "sourceMap"
15
+ ],
16
+ "additionalProperties": true,
17
+ "properties": {
18
+ "contract": {
19
+ "const": "hia-htmdoc-extraction"
20
+ },
21
+ "contractVersion": {
22
+ "const": "1.0.0"
23
+ },
24
+ "producer": {
25
+ "$ref": "#/$defs/producer"
26
+ },
27
+ "profile": {
28
+ "$ref": "#/$defs/profile"
29
+ },
30
+ "source": {
31
+ "$ref": "#/$defs/source"
32
+ },
33
+ "symbols": {
34
+ "type": "array",
35
+ "items": {
36
+ "$ref": "#/$defs/symbol"
37
+ }
38
+ },
39
+ "annotations": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object"
43
+ }
44
+ },
45
+ "diagnostics": {
46
+ "type": "array",
47
+ "items": {
48
+ "$ref": "#/$defs/diagnostic"
49
+ }
50
+ },
51
+ "sourceMap": {
52
+ "type": "object"
53
+ },
54
+ "metadata": {
55
+ "type": "object"
56
+ }
57
+ },
58
+ "$defs": {
59
+ "nonEmptyString": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "producer": {
64
+ "type": "object",
65
+ "required": [
66
+ "name",
67
+ "version"
68
+ ],
69
+ "additionalProperties": true,
70
+ "properties": {
71
+ "name": {
72
+ "$ref": "#/$defs/nonEmptyString"
73
+ },
74
+ "version": {
75
+ "$ref": "#/$defs/nonEmptyString"
76
+ }
77
+ }
78
+ },
79
+ "profile": {
80
+ "type": "object",
81
+ "required": [
82
+ "name",
83
+ "version"
84
+ ],
85
+ "additionalProperties": true,
86
+ "properties": {
87
+ "name": {
88
+ "$ref": "#/$defs/nonEmptyString"
89
+ },
90
+ "version": {
91
+ "const": "1.0.0"
92
+ }
93
+ }
94
+ },
95
+ "source": {
96
+ "type": "object",
97
+ "required": [
98
+ "kind",
99
+ "path"
100
+ ],
101
+ "additionalProperties": true,
102
+ "properties": {
103
+ "kind": {
104
+ "$ref": "#/$defs/nonEmptyString"
105
+ },
106
+ "path": {
107
+ "$ref": "#/$defs/nonEmptyString"
108
+ },
109
+ "sourcesContent": {
110
+ "type": "string"
111
+ }
112
+ }
113
+ },
114
+ "sourcePosition": {
115
+ "type": "object",
116
+ "required": [
117
+ "line"
118
+ ],
119
+ "additionalProperties": true,
120
+ "properties": {
121
+ "line": {
122
+ "type": "integer",
123
+ "minimum": 1
124
+ },
125
+ "column": {
126
+ "type": "integer",
127
+ "minimum": 1
128
+ }
129
+ }
130
+ },
131
+ "sourceRange": {
132
+ "anyOf": [
133
+ {
134
+ "type": "null"
135
+ },
136
+ {
137
+ "type": "object",
138
+ "required": [
139
+ "start"
140
+ ],
141
+ "additionalProperties": true,
142
+ "properties": {
143
+ "start": {
144
+ "$ref": "#/$defs/sourcePosition"
145
+ },
146
+ "end": {
147
+ "$ref": "#/$defs/sourcePosition"
148
+ }
149
+ }
150
+ }
151
+ ]
152
+ },
153
+ "symbol": {
154
+ "type": "object",
155
+ "required": [
156
+ "id",
157
+ "kind",
158
+ "name",
159
+ "source"
160
+ ],
161
+ "additionalProperties": true,
162
+ "properties": {
163
+ "id": {
164
+ "$ref": "#/$defs/nonEmptyString"
165
+ },
166
+ "kind": {
167
+ "enum": [
168
+ "html-component",
169
+ "html-element",
170
+ "html-template",
171
+ "html-attribute",
172
+ "html-slot",
173
+ "html-event",
174
+ "html-style-hook",
175
+ "html-a11y-note",
176
+ "html-example"
177
+ ]
178
+ },
179
+ "name": {
180
+ "$ref": "#/$defs/nonEmptyString"
181
+ },
182
+ "parentId": {
183
+ "anyOf": [
184
+ {
185
+ "$ref": "#/$defs/nonEmptyString"
186
+ },
187
+ {
188
+ "type": "null"
189
+ }
190
+ ]
191
+ },
192
+ "summary": {
193
+ "type": [
194
+ "string",
195
+ "null"
196
+ ]
197
+ },
198
+ "source": {
199
+ "type": "object",
200
+ "required": [
201
+ "path"
202
+ ],
203
+ "additionalProperties": true,
204
+ "properties": {
205
+ "path": {
206
+ "$ref": "#/$defs/nonEmptyString"
207
+ },
208
+ "range": {
209
+ "$ref": "#/$defs/sourceRange"
210
+ }
211
+ }
212
+ },
213
+ "annotation": {
214
+ "type": "object"
215
+ },
216
+ "metadata": {
217
+ "type": "object"
218
+ }
219
+ }
220
+ },
221
+ "diagnostic": {
222
+ "type": "object",
223
+ "required": [
224
+ "code",
225
+ "message",
226
+ "severity"
227
+ ],
228
+ "additionalProperties": true,
229
+ "properties": {
230
+ "code": {
231
+ "$ref": "#/$defs/nonEmptyString"
232
+ },
233
+ "message": {
234
+ "$ref": "#/$defs/nonEmptyString"
235
+ },
236
+ "severity": {
237
+ "enum": [
238
+ "info",
239
+ "warning",
240
+ "error"
241
+ ]
242
+ },
243
+ "path": {
244
+ "$ref": "#/$defs/nonEmptyString"
245
+ },
246
+ "data": {
247
+ "type": "object"
248
+ }
249
+ }
250
+ }
251
+ }
252
+ }