@kumwe/studio-protocol 0.1.0-alpha.10

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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +77 -0
  3. package/THIRD_PARTY_NOTICES.md +9 -0
  4. package/dist/generated/schema-models.d.ts +1968 -0
  5. package/dist/generated/schema-models.d.ts.map +1 -0
  6. package/dist/generated/schema-models.js +76 -0
  7. package/dist/generated/schema-models.js.map +1 -0
  8. package/dist/guards.d.ts +7 -0
  9. package/dist/guards.d.ts.map +1 -0
  10. package/dist/guards.js +374 -0
  11. package/dist/guards.js.map +1 -0
  12. package/dist/host-failure.d.ts +16 -0
  13. package/dist/host-failure.d.ts.map +1 -0
  14. package/dist/host-failure.js +27 -0
  15. package/dist/host-failure.js.map +1 -0
  16. package/dist/index.d.ts +7 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +6 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/schemas.d.ts +50 -0
  21. package/dist/schemas.d.ts.map +1 -0
  22. package/dist/schemas.js +144 -0
  23. package/dist/schemas.js.map +1 -0
  24. package/dist/types.d.ts +1256 -0
  25. package/dist/types.d.ts.map +1 -0
  26. package/dist/types.js +8 -0
  27. package/dist/types.js.map +1 -0
  28. package/package.json +42 -0
  29. package/schemas/authoring-message-catalog.schema.json +45 -0
  30. package/schemas/authoring-web-vector.schema.json +236 -0
  31. package/schemas/binding-projection-vector.schema.json +127 -0
  32. package/schemas/block-definition.schema.json +227 -0
  33. package/schemas/blueprint.schema.json +273 -0
  34. package/schemas/canonical-vector.schema.json +65 -0
  35. package/schemas/command-vector.schema.json +68 -0
  36. package/schemas/command.schema.json +410 -0
  37. package/schemas/common.schema.json +222 -0
  38. package/schemas/content-model.schema.json +216 -0
  39. package/schemas/corpus-manifest.schema.json +48 -0
  40. package/schemas/design-vocabulary.schema.json +91 -0
  41. package/schemas/entry.schema.json +32 -0
  42. package/schemas/field-adapter.schema.json +51 -0
  43. package/schemas/host-capabilities.schema.json +65 -0
  44. package/schemas/host-error.schema.json +42 -0
  45. package/schemas/host-operations.schema.json +162 -0
  46. package/schemas/host-request.schema.json +71 -0
  47. package/schemas/host-result.schema.json +19 -0
  48. package/schemas/host-sequence-vector.schema.json +342 -0
  49. package/schemas/host-vector.schema.json +199 -0
  50. package/schemas/inspector.schema.json +44 -0
  51. package/schemas/manifest.json +246 -0
  52. package/schemas/media-asset.schema.json +83 -0
  53. package/schemas/media-reference.schema.json +112 -0
  54. package/schemas/media-upload-grant.schema.json +48 -0
  55. package/schemas/media-upload-session.schema.json +109 -0
  56. package/schemas/media-vector.schema.json +123 -0
  57. package/schemas/migration.schema.json +41 -0
  58. package/schemas/pattern.schema.json +50 -0
  59. package/schemas/plugin-manifest.schema.json +126 -0
  60. package/schemas/preview-message.schema.json +583 -0
  61. package/schemas/preview-vector.schema.json +52 -0
  62. package/schemas/provenance.schema.json +57 -0
  63. package/schemas/renderer-web-vector.schema.json +160 -0
  64. package/schemas/rich-text-projection.schema.json +79 -0
  65. package/schemas/rich-text.schema.json +323 -0
  66. package/schemas/schema-profile-vector.schema.json +133 -0
  67. package/schemas/schema-profile.schema.json +201 -0
  68. package/schemas/studio-chart.schema.json +35 -0
  69. package/schemas/studio-config.schema.json +244 -0
  70. package/schemas/studio-drawing.schema.json +44 -0
  71. package/schemas/studio-money.schema.json +16 -0
  72. package/schemas/studio-presentation.schema.json +31 -0
  73. package/schemas/studio-release.schema.json +81 -0
  74. package/schemas/studio-table.schema.json +27 -0
  75. package/schemas/theme.schema.json +164 -0
  76. package/schemas/unresolved-contribution.schema.json +50 -0
  77. package/studio-release.json +18 -0
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/renderer-web-vector.schema.json",
4
+ "title": "Studio renderer-web conformance vector",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["id", "coverage", "roots", "bindings", "media", "expect"],
8
+ "properties": {
9
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
10
+ "coverage": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["blockTypes", "behaviors", "presentation", "security"],
14
+ "properties": {
15
+ "blockTypes": {
16
+ "type": "array",
17
+ "maxItems": 100,
18
+ "uniqueItems": true,
19
+ "items": { "$ref": "common.schema.json#/$defs/qualifiedName" }
20
+ },
21
+ "behaviors": {
22
+ "type": "array",
23
+ "maxItems": 50,
24
+ "uniqueItems": true,
25
+ "items": {
26
+ "enum": [
27
+ "accordion-native",
28
+ "countdown",
29
+ "dialog",
30
+ "lightbox",
31
+ "navigation-disclosure",
32
+ "notice-dismiss",
33
+ "popover",
34
+ "slideshow",
35
+ "tabs"
36
+ ]
37
+ }
38
+ },
39
+ "presentation": {
40
+ "type": "array",
41
+ "maxItems": 50,
42
+ "uniqueItems": true,
43
+ "items": {
44
+ "enum": [
45
+ "alignment",
46
+ "inverse",
47
+ "markers",
48
+ "motion",
49
+ "position",
50
+ "print",
51
+ "responsive-visibility",
52
+ "scrolling",
53
+ "sizing",
54
+ "spacing"
55
+ ]
56
+ }
57
+ },
58
+ "security": {
59
+ "type": "array",
60
+ "maxItems": 50,
61
+ "uniqueItems": true,
62
+ "items": {
63
+ "enum": [
64
+ "active-media-deny",
65
+ "blob-default-deny",
66
+ "escaped-text",
67
+ "safe-url-deny",
68
+ "typed-data-fallback"
69
+ ]
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "context": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "properties": { "allowBlobMedia": { "type": "boolean" } }
78
+ },
79
+ "roots": {
80
+ "type": "array",
81
+ "minItems": 1,
82
+ "maxItems": 100,
83
+ "items": { "$ref": "blueprint.schema.json#/$defs/node" }
84
+ },
85
+ "bindings": {
86
+ "type": "array",
87
+ "maxItems": 1000,
88
+ "items": {
89
+ "type": "object",
90
+ "additionalProperties": false,
91
+ "required": ["nodeId", "port", "value"],
92
+ "properties": {
93
+ "nodeId": { "$ref": "common.schema.json#/$defs/stableId" },
94
+ "port": { "$ref": "common.schema.json#/$defs/localName" },
95
+ "value": { "$ref": "common.schema.json#/$defs/jsonValue" }
96
+ }
97
+ }
98
+ },
99
+ "media": {
100
+ "type": "array",
101
+ "maxItems": 1000,
102
+ "items": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["assetId", "src", "altText"],
106
+ "properties": {
107
+ "assetId": { "$ref": "common.schema.json#/$defs/stableId" },
108
+ "src": { "type": "string", "minLength": 1, "maxLength": 2048 },
109
+ "altText": { "type": "string", "maxLength": 5000 },
110
+ "mediaType": { "type": "string", "maxLength": 255 },
111
+ "caption": { "type": "string", "maxLength": 20000 },
112
+ "width": { "type": "integer", "minimum": 1, "maximum": 100000 },
113
+ "height": { "type": "integer", "minimum": 1, "maximum": 100000 }
114
+ }
115
+ }
116
+ },
117
+ "expect": {
118
+ "type": "object",
119
+ "additionalProperties": false,
120
+ "required": ["htmlContains", "htmlExcludes", "cssContains", "enhancements"],
121
+ "properties": {
122
+ "htmlContains": {
123
+ "type": "array",
124
+ "maxItems": 100,
125
+ "items": { "type": "string", "maxLength": 10000 }
126
+ },
127
+ "htmlExcludes": {
128
+ "type": "array",
129
+ "maxItems": 100,
130
+ "items": { "type": "string", "maxLength": 10000 }
131
+ },
132
+ "cssContains": {
133
+ "type": "array",
134
+ "maxItems": 100,
135
+ "items": { "type": "string", "maxLength": 10000 }
136
+ },
137
+ "enhancements": {
138
+ "type": "array",
139
+ "maxItems": 100,
140
+ "items": {
141
+ "enum": [
142
+ "chart",
143
+ "countdown",
144
+ "diagram",
145
+ "dialog",
146
+ "lightbox",
147
+ "math",
148
+ "motion",
149
+ "navigation",
150
+ "notice",
151
+ "popover",
152
+ "slideshow",
153
+ "tabs"
154
+ ]
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/rich-text-projection.schema.json",
4
+ "title": "Studio rich-text renderer-conformance fixture",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["description", "document", "projection"],
8
+ "properties": {
9
+ "description": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "maxLength": 500
13
+ },
14
+ "document": { "$ref": "rich-text.schema.json" },
15
+ "projection": {
16
+ "type": "array",
17
+ "maxItems": 100000,
18
+ "items": { "$ref": "#/$defs/blockProjection" }
19
+ }
20
+ },
21
+ "$defs": {
22
+ "blockProjection": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["type", "text", "spans", "embeds"],
26
+ "properties": {
27
+ "type": {
28
+ "enum": [
29
+ "checklistItem",
30
+ "codeBlock",
31
+ "heading",
32
+ "horizontalRule",
33
+ "paragraph",
34
+ "tableCell"
35
+ ]
36
+ },
37
+ "text": {
38
+ "type": "string",
39
+ "maxLength": 250000
40
+ },
41
+ "spans": {
42
+ "type": "array",
43
+ "maxItems": 100000,
44
+ "items": { "$ref": "#/$defs/span" }
45
+ },
46
+ "embeds": {
47
+ "type": "array",
48
+ "maxItems": 100000,
49
+ "items": { "$ref": "#/$defs/embed" }
50
+ }
51
+ }
52
+ },
53
+ "span": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["start", "end", "marks"],
57
+ "properties": {
58
+ "start": { "type": "integer", "minimum": 0, "maximum": 250000 },
59
+ "end": { "type": "integer", "minimum": 1, "maximum": 250000 },
60
+ "marks": {
61
+ "type": "array",
62
+ "minItems": 1,
63
+ "maxItems": 5,
64
+ "uniqueItems": true,
65
+ "items": { "enum": ["bold", "code", "highlight", "italic", "strike"] }
66
+ }
67
+ }
68
+ },
69
+ "embed": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": ["index", "kind"],
73
+ "properties": {
74
+ "index": { "type": "integer", "minimum": 0, "maximum": 250000 },
75
+ "kind": { "enum": ["hardBreak"] }
76
+ }
77
+ }
78
+ }
79
+ }
@@ -0,0 +1,323 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/rich-text.schema.json",
4
+ "title": "Studio portable rich text",
5
+ "$ref": "#/$defs/doc",
6
+ "$defs": {
7
+ "doc": {
8
+ "type": "object",
9
+ "additionalProperties": false,
10
+ "required": ["type"],
11
+ "properties": {
12
+ "type": { "const": "doc" },
13
+ "content": {
14
+ "type": "array",
15
+ "maxItems": 5000,
16
+ "items": { "$ref": "#/$defs/block" }
17
+ }
18
+ }
19
+ },
20
+ "block": {
21
+ "oneOf": [
22
+ { "$ref": "#/$defs/paragraph" },
23
+ { "$ref": "#/$defs/heading" },
24
+ { "$ref": "#/$defs/blockquote" },
25
+ { "$ref": "#/$defs/bulletList" },
26
+ { "$ref": "#/$defs/orderedList" },
27
+ { "$ref": "#/$defs/horizontalRule" },
28
+ { "$ref": "#/$defs/checklist" },
29
+ { "$ref": "#/$defs/table" },
30
+ { "$ref": "#/$defs/callout" },
31
+ { "$ref": "#/$defs/codeBlock" }
32
+ ]
33
+ },
34
+ "paragraph": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["type"],
38
+ "properties": {
39
+ "type": { "const": "paragraph" },
40
+ "content": {
41
+ "type": "array",
42
+ "maxItems": 5000,
43
+ "items": { "$ref": "#/$defs/inline" }
44
+ }
45
+ }
46
+ },
47
+ "heading": {
48
+ "type": "object",
49
+ "additionalProperties": false,
50
+ "required": ["type", "attrs"],
51
+ "properties": {
52
+ "type": { "const": "heading" },
53
+ "attrs": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["level"],
57
+ "properties": {
58
+ "level": { "enum": [2, 3, 4] }
59
+ }
60
+ },
61
+ "content": {
62
+ "type": "array",
63
+ "maxItems": 5000,
64
+ "items": { "$ref": "#/$defs/inline" }
65
+ }
66
+ }
67
+ },
68
+ "blockquote": {
69
+ "type": "object",
70
+ "additionalProperties": false,
71
+ "required": ["type", "content"],
72
+ "properties": {
73
+ "type": { "const": "blockquote" },
74
+ "content": {
75
+ "type": "array",
76
+ "minItems": 1,
77
+ "maxItems": 5000,
78
+ "items": { "$ref": "#/$defs/block" }
79
+ }
80
+ }
81
+ },
82
+ "bulletList": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["type", "content"],
86
+ "properties": {
87
+ "type": { "const": "bulletList" },
88
+ "content": {
89
+ "type": "array",
90
+ "minItems": 1,
91
+ "maxItems": 5000,
92
+ "items": { "$ref": "#/$defs/listItem" }
93
+ }
94
+ }
95
+ },
96
+ "orderedList": {
97
+ "type": "object",
98
+ "additionalProperties": false,
99
+ "required": ["type", "content"],
100
+ "properties": {
101
+ "type": { "const": "orderedList" },
102
+ "attrs": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["start"],
106
+ "properties": {
107
+ "start": { "type": "integer", "minimum": 1, "maximum": 1000000 }
108
+ }
109
+ },
110
+ "content": {
111
+ "type": "array",
112
+ "minItems": 1,
113
+ "maxItems": 5000,
114
+ "items": { "$ref": "#/$defs/listItem" }
115
+ }
116
+ }
117
+ },
118
+ "listItem": {
119
+ "type": "object",
120
+ "additionalProperties": false,
121
+ "required": ["type", "content"],
122
+ "properties": {
123
+ "type": { "const": "listItem" },
124
+ "content": {
125
+ "type": "array",
126
+ "minItems": 1,
127
+ "maxItems": 5000,
128
+ "items": { "$ref": "#/$defs/block" }
129
+ }
130
+ }
131
+ },
132
+ "horizontalRule": {
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": ["type"],
136
+ "properties": {
137
+ "type": { "const": "horizontalRule" }
138
+ }
139
+ },
140
+ "checklist": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["type", "content"],
144
+ "properties": {
145
+ "type": { "const": "checklist" },
146
+ "content": {
147
+ "type": "array",
148
+ "minItems": 1,
149
+ "maxItems": 500,
150
+ "items": { "$ref": "#/$defs/checklistItem" }
151
+ }
152
+ }
153
+ },
154
+ "checklistItem": {
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": ["type", "attrs"],
158
+ "properties": {
159
+ "type": { "const": "checklistItem" },
160
+ "attrs": {
161
+ "type": "object",
162
+ "additionalProperties": false,
163
+ "required": ["checked", "level"],
164
+ "properties": {
165
+ "checked": { "type": "boolean" },
166
+ "level": { "type": "integer", "minimum": 0, "maximum": 4 }
167
+ }
168
+ },
169
+ "content": {
170
+ "type": "array",
171
+ "maxItems": 5000,
172
+ "items": { "$ref": "#/$defs/inline" }
173
+ }
174
+ }
175
+ },
176
+ "table": {
177
+ "type": "object",
178
+ "additionalProperties": false,
179
+ "required": ["type", "attrs", "content"],
180
+ "properties": {
181
+ "type": { "const": "table" },
182
+ "attrs": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": ["header"],
186
+ "properties": { "header": { "type": "boolean" } }
187
+ },
188
+ "content": {
189
+ "type": "array",
190
+ "minItems": 1,
191
+ "maxItems": 200,
192
+ "items": { "$ref": "#/$defs/tableRow" }
193
+ }
194
+ }
195
+ },
196
+ "tableRow": {
197
+ "type": "object",
198
+ "additionalProperties": false,
199
+ "required": ["type", "content"],
200
+ "properties": {
201
+ "type": { "const": "tableRow" },
202
+ "content": {
203
+ "type": "array",
204
+ "minItems": 1,
205
+ "maxItems": 50,
206
+ "items": { "$ref": "#/$defs/tableCell" }
207
+ }
208
+ }
209
+ },
210
+ "tableCell": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": ["type"],
214
+ "properties": {
215
+ "type": { "const": "tableCell" },
216
+ "content": {
217
+ "type": "array",
218
+ "maxItems": 5000,
219
+ "items": { "$ref": "#/$defs/inline" }
220
+ }
221
+ }
222
+ },
223
+ "callout": {
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": ["type", "attrs", "content"],
227
+ "properties": {
228
+ "type": { "const": "callout" },
229
+ "attrs": {
230
+ "type": "object",
231
+ "additionalProperties": false,
232
+ "required": ["tone"],
233
+ "properties": {
234
+ "tone": { "enum": ["danger", "info", "success", "warning"] }
235
+ }
236
+ },
237
+ "content": {
238
+ "type": "array",
239
+ "minItems": 1,
240
+ "maxItems": 5000,
241
+ "items": { "$ref": "#/$defs/block" }
242
+ }
243
+ }
244
+ },
245
+ "codeBlock": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "required": ["type", "attrs", "text"],
249
+ "properties": {
250
+ "type": { "const": "codeBlock" },
251
+ "attrs": {
252
+ "type": "object",
253
+ "additionalProperties": false,
254
+ "required": ["language"],
255
+ "properties": {
256
+ "language": {
257
+ "type": "string",
258
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9+_.#-]{0,63}$"
259
+ }
260
+ }
261
+ },
262
+ "text": { "type": "string", "maxLength": 250000 }
263
+ }
264
+ },
265
+ "hardBreak": {
266
+ "type": "object",
267
+ "additionalProperties": false,
268
+ "required": ["type"],
269
+ "properties": {
270
+ "type": { "const": "hardBreak" }
271
+ }
272
+ },
273
+ "text": {
274
+ "type": "object",
275
+ "additionalProperties": false,
276
+ "required": ["type", "text"],
277
+ "properties": {
278
+ "type": { "const": "text" },
279
+ "text": {
280
+ "type": "string",
281
+ "minLength": 1,
282
+ "maxLength": 250000
283
+ },
284
+ "marks": {
285
+ "type": "array",
286
+ "maxItems": 4,
287
+ "items": { "$ref": "#/$defs/mark" }
288
+ }
289
+ }
290
+ },
291
+ "inline": {
292
+ "oneOf": [{ "$ref": "#/$defs/text" }, { "$ref": "#/$defs/hardBreak" }]
293
+ },
294
+ "mark": {
295
+ "oneOf": [
296
+ {
297
+ "type": "object",
298
+ "additionalProperties": false,
299
+ "required": ["type"],
300
+ "properties": {
301
+ "type": { "enum": ["bold", "code", "italic", "strike"] }
302
+ }
303
+ },
304
+ {
305
+ "type": "object",
306
+ "additionalProperties": false,
307
+ "required": ["type", "attrs"],
308
+ "properties": {
309
+ "type": { "const": "highlight" },
310
+ "attrs": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "required": ["tone"],
314
+ "properties": {
315
+ "tone": { "enum": ["accent", "danger", "info", "success", "warning"] }
316
+ }
317
+ }
318
+ }
319
+ }
320
+ ]
321
+ }
322
+ }
323
+ }
@@ -0,0 +1,133 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schemas.kumwe.org/studio/v1/schema-profile-vector.schema.json",
4
+ "title": "Studio property-schema profile conformance vector",
5
+ "description": "One portable admission or instance-validation assertion for studio.profile/schema-property. Rejection vectors deliberately carry schemas outside the profile, so the schema member is bounded JSON rather than a reference to the profile meta-schema.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["contractVersion", "kind", "id", "description", "profile", "schema", "expect"],
9
+ "properties": {
10
+ "contractVersion": { "$ref": "common.schema.json#/$defs/contractVersion" },
11
+ "kind": { "const": "schema-profile-vector" },
12
+ "id": { "$ref": "common.schema.json#/$defs/stableId" },
13
+ "description": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 500
17
+ },
18
+ "profile": { "const": "studio.profile/schema-property" },
19
+ "boundary": { "$ref": "#/$defs/limitBoundary" },
20
+ "schema": {
21
+ "description": "The candidate schema. This is intentionally unconstrained so invalid-root and unsafe-member vectors remain expressible; the vector file itself remains bounded by the corpus size policy. Values JSON cannot represent are covered by implementation tests."
22
+ },
23
+ "expect": {
24
+ "oneOf": [
25
+ {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["outcome", "instances"],
29
+ "properties": {
30
+ "outcome": { "const": "accepted" },
31
+ "instances": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "maxItems": 50,
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["value", "valid"],
39
+ "properties": {
40
+ "value": { "$ref": "common.schema.json#/$defs/jsonValue" },
41
+ "valid": { "type": "boolean" },
42
+ "diagnostic": { "$ref": "#/$defs/instanceDiagnostic" }
43
+ },
44
+ "allOf": [
45
+ {
46
+ "if": { "properties": { "valid": { "const": true } } },
47
+ "then": { "properties": { "diagnostic": false } },
48
+ "else": {
49
+ "required": ["diagnostic"],
50
+ "properties": {
51
+ "diagnostic": { "$ref": "#/$defs/instanceDiagnostic" }
52
+ }
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ }
59
+ },
60
+ {
61
+ "type": "object",
62
+ "additionalProperties": false,
63
+ "required": ["outcome", "code", "schemaPath"],
64
+ "properties": {
65
+ "outcome": { "const": "rejected" },
66
+ "code": {
67
+ "enum": [
68
+ "invalid-root",
69
+ "unsupported-keyword",
70
+ "invalid-keyword-value",
71
+ "unsafe-member",
72
+ "limit-exceeded",
73
+ "invalid-reference",
74
+ "recursive-schema"
75
+ ]
76
+ },
77
+ "schemaPath": { "$ref": "#/$defs/jsonPointer" }
78
+ }
79
+ }
80
+ ]
81
+ }
82
+ },
83
+ "$defs": {
84
+ "limitBoundary": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": ["limit", "position", "value"],
88
+ "properties": {
89
+ "limit": {
90
+ "enum": [
91
+ "maxAlternatives",
92
+ "maxDescriptionLength",
93
+ "maxEnumMembers",
94
+ "maxExamples",
95
+ "maxJsonDepth",
96
+ "maxJsonItems",
97
+ "maxJsonProperties",
98
+ "maxObjectKeyLength",
99
+ "maxPropertyNames",
100
+ "maxReferenceLength",
101
+ "maxReferences",
102
+ "maxSchemaBytes",
103
+ "maxSchemaDepth",
104
+ "maxSchemaMapProperties",
105
+ "maxSchemaNodes",
106
+ "maxTitleLength"
107
+ ]
108
+ },
109
+ "position": { "enum": ["at-limit", "over-limit"] },
110
+ "value": { "type": "integer", "minimum": 1 }
111
+ }
112
+ },
113
+ "instanceDiagnostic": {
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": ["instancePath", "keyword"],
117
+ "properties": {
118
+ "instancePath": { "$ref": "#/$defs/jsonPointer" },
119
+ "keyword": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "maxLength": 100,
123
+ "pattern": "^[A-Za-z$][A-Za-z0-9$]*(?![\\s\\S])"
124
+ }
125
+ }
126
+ },
127
+ "jsonPointer": {
128
+ "type": "string",
129
+ "maxLength": 1000,
130
+ "pattern": "^(?:/(?:[^~\\u0000-\\u001F\\u007F]|~[01])*)*(?![\\s\\S])"
131
+ }
132
+ }
133
+ }