File tree Expand file tree Collapse file tree 1 file changed +60
-49
lines changed
packages/cw-schema/tests/snapshots Expand file tree Collapse file tree 1 file changed +60
-49
lines changed Original file line number Diff line number Diff line change @@ -12,23 +12,11 @@ expression: schema
12
12
" type" : {
13
13
" type" : " string" ,
14
14
" const" : " v1"
15
- },
16
- " root" : {
17
- " type" : " integer" ,
18
- " format" : " uint" ,
19
- " minimum" : 0
20
- },
21
- " definitions" : {
22
- " type" : " array" ,
23
- " items" : {
24
- " $ref" : " #/$defs/Node"
25
- }
26
15
}
27
16
},
17
+ " $ref" : " #/$defs/SchemaV1" ,
28
18
" required" : [
29
- " type" ,
30
- " root" ,
31
- " definitions"
19
+ " type"
32
20
]
33
21
}
34
22
],
@@ -297,41 +285,7 @@ expression: schema
297
285
" const" : " struct"
298
286
}
299
287
},
300
- " anyOf" : [
301
- {
302
- " type" : " null"
303
- },
304
- {
305
- " type" : " object" ,
306
- " properties" : {
307
- " properties" : {
308
- " type" : " object" ,
309
- " additionalProperties" : {
310
- " $ref" : " #/$defs/StructProperty"
311
- }
312
- }
313
- },
314
- " required" : [
315
- " properties"
316
- ]
317
- },
318
- {
319
- " type" : " object" ,
320
- " properties" : {
321
- " items" : {
322
- " type" : " array" ,
323
- " items" : {
324
- " type" : " integer" ,
325
- " format" : " uint" ,
326
- " minimum" : 0
327
- }
328
- }
329
- },
330
- " required" : [
331
- " items"
332
- ]
333
- }
334
- ],
288
+ " $ref" : " #/$defs/StructType" ,
335
289
" required" : [
336
290
" type"
337
291
]
@@ -445,6 +399,26 @@ expression: schema
445
399
" name"
446
400
]
447
401
},
402
+ " SchemaV1" : {
403
+ " type" : " object" ,
404
+ " properties" : {
405
+ " root" : {
406
+ " type" : " integer" ,
407
+ " format" : " uint" ,
408
+ " minimum" : 0
409
+ },
410
+ " definitions" : {
411
+ " type" : " array" ,
412
+ " items" : {
413
+ " $ref" : " #/$defs/Node"
414
+ }
415
+ }
416
+ },
417
+ " required" : [
418
+ " root" ,
419
+ " definitions"
420
+ ]
421
+ },
448
422
" StructProperty" : {
449
423
" type" : " object" ,
450
424
" properties" : {
@@ -463,6 +437,43 @@ expression: schema
463
437
" required" : [
464
438
" value"
465
439
]
440
+ },
441
+ " StructType" : {
442
+ " anyOf" : [
443
+ {
444
+ " type" : " null"
445
+ },
446
+ {
447
+ " type" : " object" ,
448
+ " properties" : {
449
+ " properties" : {
450
+ " type" : " object" ,
451
+ " additionalProperties" : {
452
+ " $ref" : " #/$defs/StructProperty"
453
+ }
454
+ }
455
+ },
456
+ " required" : [
457
+ " properties"
458
+ ]
459
+ },
460
+ {
461
+ " type" : " object" ,
462
+ " properties" : {
463
+ " items" : {
464
+ " type" : " array" ,
465
+ " items" : {
466
+ " type" : " integer" ,
467
+ " format" : " uint" ,
468
+ " minimum" : 0
469
+ }
470
+ }
471
+ },
472
+ " required" : [
473
+ " items"
474
+ ]
475
+ }
476
+ ]
466
477
}
467
478
}
468
479
}
You can’t perform that action at this time.
0 commit comments