@unispechq/unispec-schema 0.4.0 → 0.4.2
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.
- package/README.md +170 -162
- package/examples/README.md +128 -0
- package/examples/invalid/config/additional-properties.json +26 -0
- package/examples/invalid/config/missing-service-name.json +22 -0
- package/examples/invalid/config/missing-version.json +6 -0
- package/examples/invalid/graphql-additional-properties.json +22 -0
- package/examples/invalid/graphql-missing-arg-type.json +26 -0
- package/examples/invalid/graphql-missing-name.json +19 -0
- package/examples/invalid/graphql-missing-schema.json +19 -0
- package/examples/invalid/mixed-invalid-protocol.json +26 -0
- package/examples/invalid/mixed-missing-graphql-schema.json +33 -0
- package/examples/invalid/mixed-multiple-errors.json +41 -0
- package/examples/invalid/rest-additional-properties.json +25 -0
- package/examples/invalid/rest-invalid-identifiers.json +29 -0
- package/examples/invalid/rest-invalid-method.json +23 -0
- package/examples/invalid/rest-missing-required.json +21 -0
- package/examples/invalid/websocket-additional-properties.json +27 -0
- package/examples/invalid/websocket-invalid-direction.json +27 -0
- package/examples/invalid/websocket-missing-channel-name.json +25 -0
- package/examples/invalid/websocket-missing-message-name.json +25 -0
- package/examples/valid/config/complete.json +61 -0
- package/examples/valid/config/minimal.json +8 -0
- package/examples/valid/graphql-complete.json +348 -0
- package/examples/valid/graphql-simple.json +34 -0
- package/examples/valid/mixed-complete.json +799 -0
- package/examples/valid/mixed-simple.json +56 -0
- package/examples/valid/rest-complete.json +539 -0
- package/examples/valid/rest-simple.json +279 -0
- package/examples/valid/websocket-complete.json +471 -0
- package/examples/valid/websocket-simple.json +116 -0
- package/index.cjs +7 -7
- package/index.d.ts +9 -9
- package/index.mjs +9 -9
- package/package.json +15 -6
- package/schema/index.json +19 -19
- package/schema/types/common.schema.json +195 -195
- package/schema/types/graphql.schema.json +172 -172
- package/schema/types/rest.schema.json +221 -226
- package/schema/types/schemas.schema.json +84 -84
- package/schema/types/service.schema.json +158 -158
- package/schema/types/websocket.schema.json +185 -190
- package/schema/unispec-config.schema.json +509 -509
- package/schema/unispec-tests.schema.json +368 -378
- package/schema/unispec.schema.json +18 -23
|
@@ -1,509 +1,509 @@
|
|
|
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
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unispec.dev/schema/unispec-config.schema.json",
|
|
4
|
+
"title": "UniSpec Config",
|
|
5
|
+
"description": "Configuration file that describes how to locate UniSpec documents for one or more services.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "services"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": {
|
|
10
|
+
"type": "integer",
|
|
11
|
+
"description": "Config format version.",
|
|
12
|
+
"minimum": 1
|
|
13
|
+
},
|
|
14
|
+
"services": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"description": "List of services available in this config.",
|
|
17
|
+
"items": {
|
|
18
|
+
"$ref": "#/$defs/ServiceEntry"
|
|
19
|
+
},
|
|
20
|
+
"minItems": 1
|
|
21
|
+
},
|
|
22
|
+
"discovery": {
|
|
23
|
+
"$ref": "#/$defs/Discovery"
|
|
24
|
+
},
|
|
25
|
+
"environments": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"description": "Named environments (for example, local, staging, prod) with optional overrides.",
|
|
28
|
+
"items": {
|
|
29
|
+
"$ref": "#/$defs/Environment"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"$defs": {
|
|
34
|
+
"ServiceEntry": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["name", "spec"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"name": {
|
|
39
|
+
"$ref": "./types/common.schema.json#/$defs/Identifier"
|
|
40
|
+
},
|
|
41
|
+
"baseUrl": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Service base URL. Can differ per service and can be overridden by environments."
|
|
44
|
+
},
|
|
45
|
+
"spec": {
|
|
46
|
+
"$ref": "#/$defs/SpecReference"
|
|
47
|
+
},
|
|
48
|
+
"health": {
|
|
49
|
+
"$ref": "#/$defs/Health"
|
|
50
|
+
},
|
|
51
|
+
"discovery": {
|
|
52
|
+
"$ref": "#/$defs/Discovery"
|
|
53
|
+
},
|
|
54
|
+
"headers": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"description": "HTTP headers commonly used for accessing this service's UniSpec document.",
|
|
57
|
+
"items": {
|
|
58
|
+
"$ref": "#/$defs/Header"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"security": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"description": "Security requirements for accessing this service's UniSpec document. Each item represents an alternative set of named security schemes.",
|
|
64
|
+
"items": {
|
|
65
|
+
"$ref": "#/$defs/SecurityRequirement"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
},
|
|
71
|
+
"SpecReference": {
|
|
72
|
+
"description": "Reference to a UniSpec document.",
|
|
73
|
+
"oneOf": [
|
|
74
|
+
{
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Backward-compatible spec reference. Tooling interprets it as a location string (for example, URL or file path)."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"$ref": "#/$defs/HttpSpecReference"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"$ref": "#/$defs/FileSpecReference"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"$ref": "#/$defs/RegistrySpecReference"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"HttpSpecReference": {
|
|
90
|
+
"type": "object",
|
|
91
|
+
"required": ["type"],
|
|
92
|
+
"properties": {
|
|
93
|
+
"type": {
|
|
94
|
+
"const": "http"
|
|
95
|
+
},
|
|
96
|
+
"url": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "Absolute or relative URL to the UniSpec document (for example, https://... or /unispec.json)."
|
|
99
|
+
},
|
|
100
|
+
"path": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"description": "Backward-compatible alias for url (for example, /unispec.yaml)."
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"oneOf": [{ "required": ["url"] }, { "required": ["path"] }],
|
|
106
|
+
"additionalProperties": false
|
|
107
|
+
},
|
|
108
|
+
"FileSpecReference": {
|
|
109
|
+
"type": "object",
|
|
110
|
+
"required": ["type", "path"],
|
|
111
|
+
"properties": {
|
|
112
|
+
"type": {
|
|
113
|
+
"const": "file"
|
|
114
|
+
},
|
|
115
|
+
"path": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"description": "Path to the UniSpec document on disk (for example, ./path/to/unispec.json)."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
},
|
|
122
|
+
"RegistrySpecReference": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"required": ["type", "ref"],
|
|
125
|
+
"properties": {
|
|
126
|
+
"type": {
|
|
127
|
+
"const": "registry"
|
|
128
|
+
},
|
|
129
|
+
"ref": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "Registry reference for resolving the UniSpec document."
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"additionalProperties": false
|
|
135
|
+
},
|
|
136
|
+
"Health": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"required": ["path"],
|
|
139
|
+
"properties": {
|
|
140
|
+
"path": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "HTTP path for a health check endpoint (for example, /ping)."
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"additionalProperties": false
|
|
146
|
+
},
|
|
147
|
+
"Discovery": {
|
|
148
|
+
"type": "object",
|
|
149
|
+
"properties": {
|
|
150
|
+
"dnsTemplate": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "DNS-based discovery template. Template variables: {service}, {env}. If environment is not set, {env} is replaced with an empty string."
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"additionalProperties": false
|
|
156
|
+
},
|
|
157
|
+
"Environment": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"required": ["name"],
|
|
160
|
+
"properties": {
|
|
161
|
+
"name": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "Environment name (for example, local, staging, prod)."
|
|
164
|
+
},
|
|
165
|
+
"overrides": {
|
|
166
|
+
"$ref": "#/$defs/EnvironmentOverrides"
|
|
167
|
+
},
|
|
168
|
+
"observability": {
|
|
169
|
+
"$ref": "#/$defs/Observability"
|
|
170
|
+
},
|
|
171
|
+
"deployment": {
|
|
172
|
+
"$ref": "#/$defs/Deployment"
|
|
173
|
+
},
|
|
174
|
+
"dataResidency": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "Geographic region where data is stored for compliance."
|
|
177
|
+
},
|
|
178
|
+
"audit": {
|
|
179
|
+
"$ref": "#/$defs/Audit"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"additionalProperties": false
|
|
183
|
+
},
|
|
184
|
+
"EnvironmentOverrides": {
|
|
185
|
+
"type": "object",
|
|
186
|
+
"properties": {
|
|
187
|
+
"services": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"description": "Per-service overrides. Keys are service names.",
|
|
190
|
+
"additionalProperties": {
|
|
191
|
+
"$ref": "#/$defs/ServiceOverride"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"additionalProperties": false
|
|
196
|
+
},
|
|
197
|
+
"ServiceOverride": {
|
|
198
|
+
"type": "object",
|
|
199
|
+
"properties": {
|
|
200
|
+
"baseUrl": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "Override for service baseUrl in this environment."
|
|
203
|
+
},
|
|
204
|
+
"spec": {
|
|
205
|
+
"$ref": "#/$defs/SpecReference"
|
|
206
|
+
},
|
|
207
|
+
"health": {
|
|
208
|
+
"$ref": "#/$defs/Health"
|
|
209
|
+
},
|
|
210
|
+
"discovery": {
|
|
211
|
+
"$ref": "#/$defs/Discovery"
|
|
212
|
+
},
|
|
213
|
+
"headers": {
|
|
214
|
+
"type": "array",
|
|
215
|
+
"description": "HTTP headers overrides for accessing this service's UniSpec document in this environment.",
|
|
216
|
+
"items": {
|
|
217
|
+
"$ref": "#/$defs/Header"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"security": {
|
|
221
|
+
"type": "array",
|
|
222
|
+
"description": "Security requirements overrides for accessing this service's UniSpec document in this environment.",
|
|
223
|
+
"items": {
|
|
224
|
+
"$ref": "#/$defs/SecurityRequirement"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"additionalProperties": false
|
|
229
|
+
},
|
|
230
|
+
"Header": {
|
|
231
|
+
"type": "object",
|
|
232
|
+
"required": ["name"],
|
|
233
|
+
"properties": {
|
|
234
|
+
"name": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"description": "Header name (case-insensitive)."
|
|
237
|
+
},
|
|
238
|
+
"description": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"description": "Human-readable description of the header."
|
|
241
|
+
},
|
|
242
|
+
"required": {
|
|
243
|
+
"type": "boolean",
|
|
244
|
+
"description": "Whether this header is required.",
|
|
245
|
+
"default": false
|
|
246
|
+
},
|
|
247
|
+
"defaultValue": {
|
|
248
|
+
"type": "string",
|
|
249
|
+
"description": "Default value for the header."
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"additionalProperties": false
|
|
253
|
+
},
|
|
254
|
+
"SecurityRequirement": {
|
|
255
|
+
"type": "array",
|
|
256
|
+
"description": "Alternative set of named security schemes applied to a service or operation.",
|
|
257
|
+
"items": {
|
|
258
|
+
"$ref": "./types/common.schema.json#/$defs/Identifier"
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"Observability": {
|
|
262
|
+
"type": "object",
|
|
263
|
+
"description": "Observability configuration for the environment.",
|
|
264
|
+
"properties": {
|
|
265
|
+
"logging": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"properties": {
|
|
268
|
+
"level": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"enum": ["debug", "info", "warn", "error"],
|
|
271
|
+
"description": "Logging level."
|
|
272
|
+
},
|
|
273
|
+
"format": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"enum": ["json", "text"],
|
|
276
|
+
"description": "Log format."
|
|
277
|
+
},
|
|
278
|
+
"fields": {
|
|
279
|
+
"type": "array",
|
|
280
|
+
"items": {
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
"description": "Additional fields to include in logs."
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
"additionalProperties": false
|
|
287
|
+
},
|
|
288
|
+
"metrics": {
|
|
289
|
+
"type": "object",
|
|
290
|
+
"properties": {
|
|
291
|
+
"enabled": {
|
|
292
|
+
"type": "boolean",
|
|
293
|
+
"description": "Whether metrics collection is enabled."
|
|
294
|
+
},
|
|
295
|
+
"endpoints": {
|
|
296
|
+
"type": "array",
|
|
297
|
+
"items": {
|
|
298
|
+
"type": "string"
|
|
299
|
+
},
|
|
300
|
+
"description": "Metrics endpoints."
|
|
301
|
+
},
|
|
302
|
+
"customMetrics": {
|
|
303
|
+
"type": "array",
|
|
304
|
+
"items": {
|
|
305
|
+
"$ref": "#/$defs/CustomMetric"
|
|
306
|
+
},
|
|
307
|
+
"description": "Custom metrics definitions."
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"additionalProperties": false
|
|
311
|
+
},
|
|
312
|
+
"tracing": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"properties": {
|
|
315
|
+
"enabled": {
|
|
316
|
+
"type": "boolean",
|
|
317
|
+
"description": "Whether distributed tracing is enabled."
|
|
318
|
+
},
|
|
319
|
+
"samplingRate": {
|
|
320
|
+
"type": "number",
|
|
321
|
+
"minimum": 0,
|
|
322
|
+
"maximum": 1,
|
|
323
|
+
"description": "Sampling rate for traces (0.0 to 1.0)."
|
|
324
|
+
},
|
|
325
|
+
"exporter": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"description": "Tracing exporter (e.g., jaeger, zipkin)."
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"additionalProperties": false
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"additionalProperties": false
|
|
334
|
+
},
|
|
335
|
+
"CustomMetric": {
|
|
336
|
+
"type": "object",
|
|
337
|
+
"properties": {
|
|
338
|
+
"name": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"description": "Metric name."
|
|
341
|
+
},
|
|
342
|
+
"type": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"enum": ["counter", "gauge", "histogram", "summary"],
|
|
345
|
+
"description": "Metric type."
|
|
346
|
+
},
|
|
347
|
+
"description": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Metric description."
|
|
350
|
+
},
|
|
351
|
+
"labels": {
|
|
352
|
+
"type": "array",
|
|
353
|
+
"items": {
|
|
354
|
+
"type": "string"
|
|
355
|
+
},
|
|
356
|
+
"description": "Metric labels."
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"required": ["name", "type"],
|
|
360
|
+
"additionalProperties": false
|
|
361
|
+
},
|
|
362
|
+
"Deployment": {
|
|
363
|
+
"type": "object",
|
|
364
|
+
"description": "Deployment configuration for the environment.",
|
|
365
|
+
"properties": {
|
|
366
|
+
"kubernetes": {
|
|
367
|
+
"$ref": "#/$defs/KubernetesConfig"
|
|
368
|
+
},
|
|
369
|
+
"docker": {
|
|
370
|
+
"$ref": "#/$defs/DockerConfig"
|
|
371
|
+
},
|
|
372
|
+
"replicas": {
|
|
373
|
+
"type": "integer",
|
|
374
|
+
"minimum": 1,
|
|
375
|
+
"description": "Number of replicas."
|
|
376
|
+
},
|
|
377
|
+
"resources": {
|
|
378
|
+
"$ref": "#/$defs/Resources"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"additionalProperties": false
|
|
382
|
+
},
|
|
383
|
+
"KubernetesConfig": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"properties": {
|
|
386
|
+
"namespace": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"description": "Kubernetes namespace."
|
|
389
|
+
},
|
|
390
|
+
"image": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"description": "Container image."
|
|
393
|
+
},
|
|
394
|
+
"port": {
|
|
395
|
+
"type": "integer",
|
|
396
|
+
"description": "Container port."
|
|
397
|
+
},
|
|
398
|
+
"serviceType": {
|
|
399
|
+
"type": "string",
|
|
400
|
+
"enum": ["ClusterIP", "NodePort", "LoadBalancer"],
|
|
401
|
+
"description": "Kubernetes service type."
|
|
402
|
+
},
|
|
403
|
+
"ingress": {
|
|
404
|
+
"type": "object",
|
|
405
|
+
"properties": {
|
|
406
|
+
"host": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"description": "Ingress host."
|
|
409
|
+
},
|
|
410
|
+
"path": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"description": "Ingress path."
|
|
413
|
+
},
|
|
414
|
+
"tls": {
|
|
415
|
+
"type": "boolean",
|
|
416
|
+
"description": "Whether TLS is enabled."
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
"additionalProperties": false
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"additionalProperties": false
|
|
423
|
+
},
|
|
424
|
+
"DockerConfig": {
|
|
425
|
+
"type": "object",
|
|
426
|
+
"properties": {
|
|
427
|
+
"image": {
|
|
428
|
+
"type": "string",
|
|
429
|
+
"description": "Docker image."
|
|
430
|
+
},
|
|
431
|
+
"port": {
|
|
432
|
+
"type": "integer",
|
|
433
|
+
"description": "Container port."
|
|
434
|
+
},
|
|
435
|
+
"environment": {
|
|
436
|
+
"type": "object",
|
|
437
|
+
"additionalProperties": {
|
|
438
|
+
"type": "string"
|
|
439
|
+
},
|
|
440
|
+
"description": "Environment variables."
|
|
441
|
+
},
|
|
442
|
+
"volumes": {
|
|
443
|
+
"type": "array",
|
|
444
|
+
"items": {
|
|
445
|
+
"type": "string"
|
|
446
|
+
},
|
|
447
|
+
"description": "Volume mounts."
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
"additionalProperties": false
|
|
451
|
+
},
|
|
452
|
+
"Resources": {
|
|
453
|
+
"type": "object",
|
|
454
|
+
"properties": {
|
|
455
|
+
"cpu": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"description": "CPU request/limit."
|
|
458
|
+
},
|
|
459
|
+
"memory": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"description": "Memory request/limit."
|
|
462
|
+
},
|
|
463
|
+
"storage": {
|
|
464
|
+
"type": "string",
|
|
465
|
+
"description": "Storage request/limit."
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"additionalProperties": false
|
|
469
|
+
},
|
|
470
|
+
"Audit": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"description": "Audit configuration for compliance.",
|
|
473
|
+
"properties": {
|
|
474
|
+
"enabled": {
|
|
475
|
+
"type": "boolean",
|
|
476
|
+
"description": "Whether audit logging is enabled."
|
|
477
|
+
},
|
|
478
|
+
"retention": {
|
|
479
|
+
"type": "string",
|
|
480
|
+
"description": "Audit log retention period."
|
|
481
|
+
},
|
|
482
|
+
"fields": {
|
|
483
|
+
"type": "array",
|
|
484
|
+
"items": {
|
|
485
|
+
"type": "string"
|
|
486
|
+
},
|
|
487
|
+
"description": "Fields to include in audit logs."
|
|
488
|
+
},
|
|
489
|
+
"export": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"properties": {
|
|
492
|
+
"format": {
|
|
493
|
+
"type": "string",
|
|
494
|
+
"enum": ["json", "csv"],
|
|
495
|
+
"description": "Export format."
|
|
496
|
+
},
|
|
497
|
+
"destination": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"description": "Export destination."
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"additionalProperties": false
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
"additionalProperties": false
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
"additionalProperties": false
|
|
509
|
+
}
|