af710487 |
1 | { |
3abe9331 |
2 | "$schema" : "http://json-schema.org/draft-04/schema#", |
af710487 |
3 | "definitions" : { |
4 | "one" : { |
5 | "HasAny" : { |
6 | "type" : "object", |
7 | "subType" : "record", |
8 | "properties" : { |
9 | "num" : { |
10 | "type" : "integer" |
11 | }, |
12 | "at" : { |
13 | "$ref" : "#/definitions/one/anytype" |
14 | } |
15 | }, |
16 | "additionalProperties" : false, |
17 | "fieldOrder" : [ |
18 | "num", |
19 | "at" |
20 | ], |
21 | "required" : [ |
22 | "num", |
23 | "at" |
24 | ] |
25 | }, |
26 | "Height" : { |
27 | "enum" : [ |
28 | "Short", |
29 | "Medium", |
30 | "Tall" |
31 | ], |
32 | "numericValues" : [ |
33 | 0, |
34 | 1, |
35 | 2 |
36 | ] |
37 | }, |
38 | "Rec" : { |
39 | "type" : "object", |
40 | "subType" : "record", |
41 | "properties" : { |
42 | "num" : { |
43 | "type" : "integer", |
44 | "default" : 0 |
45 | }, |
46 | "str" : { |
47 | "type" : "string", |
48 | "subType" : "universal charstring", |
49 | "default" : "empty" |
50 | } |
51 | }, |
52 | "additionalProperties" : false, |
53 | "fieldOrder" : [ |
54 | "num", |
55 | "str" |
56 | ], |
57 | "required" : [ |
58 | "num", |
59 | "str" |
3abe9331 |
60 | ], |
61 | "comment" : "abc" |
af710487 |
62 | }, |
63 | "Set" : { |
64 | "type" : "object", |
65 | "subType" : "set", |
66 | "properties" : { |
67 | "os" : { |
68 | "type" : "string", |
69 | "subType" : "octetstring", |
3abe9331 |
70 | "pattern" : "^([0-9A-Fa-f][0-9A-Fa-f])*$", |
71 | "MSB" : "first" |
af710487 |
72 | }, |
73 | "buul" : { |
74 | "anyOf" : [ |
75 | { |
76 | "type" : "null" |
77 | }, |
78 | { |
79 | "type" : "boolean" |
80 | } |
81 | ], |
82 | "omitAsNull" : true |
83 | }, |
84 | "verd" : { |
85 | "anyOf" : [ |
86 | { |
87 | "type" : "null" |
88 | }, |
89 | { |
90 | "enum" : [ |
91 | "none", |
92 | "pass", |
93 | "inconc", |
94 | "fail", |
95 | "error" |
96 | ] |
97 | } |
98 | ], |
99 | "omitAsNull" : false |
100 | }, |
101 | "numbr" : { |
102 | "anyOf" : [ |
103 | { |
104 | "type" : "number" |
105 | }, |
106 | { |
107 | "enum" : [ |
108 | "not_a_number", |
109 | "infinity", |
110 | "-infinity" |
111 | ] |
112 | } |
113 | ], |
114 | "default" : "-infinity" |
115 | } |
116 | }, |
117 | "additionalProperties" : false, |
118 | "fieldOrder" : [ |
119 | "os", |
120 | "buul", |
121 | "verd", |
122 | "numbr" |
123 | ], |
124 | "required" : [ |
125 | "os", |
126 | "numbr" |
127 | ] |
128 | }, |
129 | "Uni" : { |
130 | "anyOf" : [ |
131 | { |
132 | "type" : "object", |
133 | "properties" : { |
134 | "numbr" : { |
135 | "anyOf" : [ |
136 | { |
137 | "type" : "number" |
138 | }, |
139 | { |
140 | "enum" : [ |
141 | "not_a_number", |
142 | "infinity", |
143 | "-infinity" |
144 | ] |
145 | } |
146 | ] |
147 | } |
148 | }, |
149 | "additionalProperties" : false, |
150 | "required" : [ |
151 | "numbr" |
152 | ] |
153 | }, |
154 | { |
155 | "type" : "object", |
156 | "properties" : { |
157 | "bytes" : { |
158 | "type" : "string", |
159 | "subType" : "octetstring", |
160 | "pattern" : "^([0-9A-Fa-f][0-9A-Fa-f])*$" |
161 | } |
162 | }, |
163 | "additionalProperties" : false, |
164 | "required" : [ |
165 | "bytes" |
166 | ] |
167 | } |
3abe9331 |
168 | ], |
169 | "defaultSelection" : "numbr" |
af710487 |
170 | }, |
171 | "Width" : { |
172 | "enum" : [ |
173 | "Thin", |
174 | "Medium", |
175 | "Wide" |
176 | ], |
177 | "numericValues" : [ |
178 | 0, |
179 | 1, |
180 | 2 |
181 | ] |
182 | }, |
183 | "anytype" : { |
184 | "anyOf" : [ |
185 | { |
186 | "type" : "object", |
187 | "properties" : { |
188 | "integer" : { |
189 | "type" : "integer" |
190 | } |
191 | }, |
192 | "additionalProperties" : false, |
193 | "required" : [ |
194 | "integer" |
195 | ] |
196 | }, |
197 | { |
198 | "type" : "object", |
199 | "properties" : { |
200 | "boolean" : { |
201 | "type" : "boolean" |
202 | } |
203 | }, |
204 | "additionalProperties" : false, |
205 | "required" : [ |
206 | "boolean" |
207 | ] |
208 | }, |
209 | { |
210 | "type" : "object", |
211 | "properties" : { |
212 | "bitstring" : { |
213 | "type" : "string", |
214 | "subType" : "bitstring", |
215 | "pattern" : "^[01]*$" |
216 | } |
217 | }, |
218 | "additionalProperties" : false, |
219 | "required" : [ |
220 | "bitstring" |
221 | ] |
222 | } |
223 | ] |
224 | } |
225 | }, |
226 | "two" : { |
227 | "Ints" : { |
228 | "type" : "array", |
229 | "subType" : "record of", |
230 | "items" : { |
231 | "type" : "integer" |
232 | } |
233 | }, |
3abe9331 |
234 | "Intses" : { |
235 | "type" : "array", |
236 | "subType" : "record of", |
237 | "items" : { |
238 | "$ref" : "#/definitions/two/Ints" |
239 | }, |
240 | "alias" : "RoRoI" |
241 | }, |
242 | "Octets" : { |
243 | "type" : "array", |
244 | "subType" : "set of", |
245 | "items" : { |
246 | "type" : "string", |
247 | "subType" : "octetstring", |
248 | "pattern" : "^([0-9A-Fa-f][0-9A-Fa-f])*$" |
249 | }, |
250 | "comment" : "set of octetstrings" |
251 | }, |
af710487 |
252 | "PosInt" : { |
3abe9331 |
253 | "type" : "integer", |
254 | "minimum" : 0, |
255 | "exclusiveMinimum" : false |
af710487 |
256 | } |
257 | }, |
258 | "three" : { |
259 | "Barrels" : { |
260 | "type" : "object", |
261 | "subType" : "set", |
262 | "properties" : { |
263 | "numBarrels" : { |
264 | "type" : "integer" |
265 | }, |
266 | "barrelType" : { |
267 | "type" : "object", |
268 | "subType" : "record", |
269 | "properties" : { |
270 | "size" : { |
271 | "enum" : [ |
272 | "Small", |
273 | "Medium", |
274 | "Large" |
275 | ], |
276 | "numericValues" : [ |
277 | 0, |
278 | 1, |
279 | 2 |
280 | ] |
281 | }, |
282 | "filled" : { |
283 | "type" : "boolean" |
284 | } |
285 | }, |
286 | "additionalProperties" : false, |
287 | "fieldOrder" : [ |
288 | "size", |
289 | "filled" |
290 | ], |
291 | "required" : [ |
292 | "size", |
293 | "filled" |
3abe9331 |
294 | ], |
295 | "comment" : "first comment", |
296 | "comment" : "second comment" |
af710487 |
297 | } |
298 | }, |
299 | "additionalProperties" : false, |
300 | "fieldOrder" : [ |
301 | "numBarrels", |
302 | "barrelType" |
303 | ], |
304 | "required" : [ |
305 | "numBarrels", |
306 | "barrelType" |
307 | ] |
308 | }, |
309 | "Nums" : { |
310 | "type" : "array", |
311 | "subType" : "set of", |
312 | "items" : { |
313 | "type" : "object", |
314 | "subType" : "record", |
315 | "properties" : { |
316 | "number" : { |
317 | "originalName" : "num", |
318 | "type" : "integer" |
319 | } |
320 | }, |
321 | "additionalProperties" : false, |
322 | "required" : [ |
323 | "number" |
324 | ] |
325 | } |
326 | }, |
327 | "Numz" : { |
328 | "type" : "object", |
329 | "subType" : "record", |
330 | "properties" : { |
331 | "nums" : { |
332 | "$ref" : "#/definitions/three/Nums" |
333 | } |
334 | }, |
335 | "additionalProperties" : false, |
336 | "required" : [ |
337 | "nums" |
338 | ] |
339 | }, |
340 | "Rex" : { |
341 | "type" : "array", |
342 | "subType" : "record of", |
343 | "items" : { |
344 | "$ref" : "#/definitions/one/Rec" |
345 | } |
346 | }, |
347 | "Stuff" : { |
348 | "type" : "array", |
349 | "subType" : "record of", |
350 | "items" : { |
351 | "$ref" : "#/definitions/three/Thing" |
352 | } |
353 | }, |
354 | "Thing" : { |
355 | "anyOf" : [ |
356 | { |
357 | "originalName" : "b", |
358 | "type" : "boolean" |
359 | }, |
360 | { |
361 | "originalName" : "i", |
362 | "unusedAlias" : "int", |
363 | "type" : "integer" |
364 | }, |
365 | { |
366 | "originalName" : "cs", |
367 | "unusedAlias" : "str", |
368 | "type" : "string", |
369 | "subType" : "charstring" |
370 | }, |
371 | { |
372 | "originalName" : "rec", |
373 | "type" : "object", |
374 | "subType" : "record", |
375 | "properties" : { |
376 | "num" : { |
377 | "type" : "integer" |
378 | } |
379 | }, |
380 | "additionalProperties" : false, |
381 | "required" : [ |
382 | "num" |
383 | ] |
384 | } |
385 | ] |
386 | } |
387 | }, |
388 | "Zero" : { |
389 | "AnyString" : { |
390 | "anyOf" : [ |
391 | { |
392 | "type" : "object", |
393 | "properties" : { |
394 | "generalstr" : { |
395 | "type" : "string", |
396 | "subType" : "universal charstring" |
397 | } |
398 | }, |
399 | "additionalProperties" : false, |
400 | "required" : [ |
401 | "generalstr" |
402 | ] |
403 | }, |
404 | { |
405 | "type" : "object", |
406 | "properties" : { |
407 | "numericstr" : { |
408 | "type" : "string", |
409 | "subType" : "charstring" |
410 | } |
411 | }, |
412 | "additionalProperties" : false, |
413 | "required" : [ |
414 | "numericstr" |
415 | ] |
416 | }, |
417 | { |
418 | "type" : "object", |
419 | "properties" : { |
420 | "utf8str" : { |
421 | "type" : "string", |
422 | "subType" : "universal charstring" |
423 | } |
424 | }, |
425 | "additionalProperties" : false, |
426 | "required" : [ |
427 | "utf8str" |
428 | ] |
429 | }, |
430 | { |
431 | "type" : "object", |
432 | "properties" : { |
433 | "printablestr" : { |
434 | "type" : "string", |
435 | "subType" : "charstring" |
436 | } |
437 | }, |
438 | "additionalProperties" : false, |
439 | "required" : [ |
440 | "printablestr" |
441 | ] |
442 | }, |
443 | { |
444 | "type" : "object", |
445 | "properties" : { |
446 | "universalstr" : { |
447 | "type" : "string", |
448 | "subType" : "universal charstring" |
449 | } |
450 | }, |
451 | "additionalProperties" : false, |
452 | "required" : [ |
453 | "universalstr" |
454 | ] |
455 | }, |
456 | { |
457 | "type" : "object", |
458 | "properties" : { |
459 | "bmpstr" : { |
460 | "type" : "string", |
461 | "subType" : "universal charstring" |
462 | } |
463 | }, |
464 | "additionalProperties" : false, |
465 | "required" : [ |
466 | "bmpstr" |
467 | ] |
468 | }, |
469 | { |
470 | "type" : "object", |
471 | "properties" : { |
472 | "graphicstr" : { |
473 | "type" : "string", |
474 | "subType" : "universal charstring" |
475 | } |
476 | }, |
477 | "additionalProperties" : false, |
478 | "required" : [ |
479 | "graphicstr" |
480 | ] |
481 | }, |
482 | { |
483 | "type" : "object", |
484 | "properties" : { |
485 | "ia5str" : { |
486 | "type" : "string", |
487 | "subType" : "charstring" |
488 | } |
489 | }, |
490 | "additionalProperties" : false, |
491 | "required" : [ |
492 | "ia5str" |
493 | ] |
494 | }, |
495 | { |
496 | "type" : "object", |
497 | "properties" : { |
498 | "teletexstr" : { |
499 | "type" : "string", |
500 | "subType" : "universal charstring" |
501 | } |
502 | }, |
503 | "additionalProperties" : false, |
504 | "required" : [ |
505 | "teletexstr" |
506 | ] |
507 | }, |
508 | { |
509 | "type" : "object", |
510 | "properties" : { |
511 | "videotexstr" : { |
512 | "type" : "string", |
513 | "subType" : "universal charstring" |
514 | } |
515 | }, |
516 | "additionalProperties" : false, |
517 | "required" : [ |
518 | "videotexstr" |
519 | ] |
520 | }, |
521 | { |
522 | "type" : "object", |
523 | "properties" : { |
524 | "visiblestr" : { |
525 | "type" : "string", |
526 | "subType" : "charstring" |
527 | } |
528 | }, |
529 | "additionalProperties" : false, |
530 | "required" : [ |
531 | "visiblestr" |
532 | ] |
533 | } |
534 | ] |
535 | }, |
536 | "Big_Choice" : { |
537 | "anyOf" : [ |
538 | { |
539 | "type" : "object", |
540 | "properties" : { |
541 | "numbers" : { |
542 | "type" : "array", |
543 | "subType" : "set of", |
544 | "items" : { |
545 | "$ref" : "#/definitions/Zero/Number" |
546 | } |
547 | } |
548 | }, |
549 | "additionalProperties" : false, |
550 | "required" : [ |
551 | "numbers" |
552 | ] |
553 | }, |
554 | { |
555 | "type" : "object", |
556 | "properties" : { |
557 | "strings" : { |
558 | "$ref" : "#/definitions/Zero/ManyStrings" |
559 | } |
560 | }, |
561 | "additionalProperties" : false, |
562 | "required" : [ |
563 | "strings" |
564 | ] |
565 | } |
566 | ] |
567 | }, |
568 | "Big_Set" : { |
569 | "type" : "object", |
570 | "subType" : "set", |
571 | "properties" : { |
572 | "product" : { |
573 | "$ref" : "#/definitions/Zero/SeqProduct" |
574 | }, |
575 | "numbers" : { |
576 | "type" : "array", |
577 | "subType" : "set of", |
578 | "items" : { |
579 | "$ref" : "#/definitions/Zero/Number" |
580 | } |
581 | }, |
582 | "strings" : { |
583 | "$ref" : "#/definitions/Zero/ManyStrings" |
584 | }, |
585 | "color" : { |
586 | "enum" : [ |
587 | "red", |
588 | "blue", |
589 | "green", |
590 | "yellow" |
591 | ], |
592 | "numericValues" : [ |
593 | 0, |
594 | 1, |
595 | 2, |
596 | 3 |
597 | ] |
598 | } |
599 | }, |
600 | "additionalProperties" : false, |
601 | "fieldOrder" : [ |
602 | "product", |
603 | "numbers", |
604 | "strings", |
605 | "color" |
606 | ], |
607 | "required" : [ |
608 | "product", |
609 | "numbers", |
610 | "strings", |
611 | "color" |
612 | ] |
613 | }, |
614 | "ManyStrings" : { |
615 | "type" : "array", |
616 | "subType" : "record of", |
617 | "items" : { |
618 | "$ref" : "#/definitions/Zero/AnyString" |
619 | } |
620 | }, |
621 | "NullType" : { |
622 | "type" : "null" |
623 | }, |
624 | "Number" : { |
625 | "anyOf" : [ |
626 | { |
627 | "type" : "object", |
628 | "properties" : { |
629 | "decimal" : { |
630 | "type" : "integer" |
631 | } |
632 | }, |
633 | "additionalProperties" : false, |
634 | "required" : [ |
635 | "decimal" |
636 | ] |
637 | }, |
638 | { |
639 | "type" : "object", |
640 | "properties" : { |
641 | "binary" : { |
642 | "type" : "string", |
643 | "subType" : "bitstring", |
644 | "pattern" : "^[01]*$" |
645 | } |
646 | }, |
647 | "additionalProperties" : false, |
648 | "required" : [ |
649 | "binary" |
650 | ] |
651 | }, |
652 | { |
653 | "type" : "object", |
654 | "properties" : { |
655 | "hexadecimal" : { |
656 | "type" : "string", |
657 | "subType" : "octetstring", |
658 | "pattern" : "^([0-9A-Fa-f][0-9A-Fa-f])*$" |
659 | } |
660 | }, |
661 | "additionalProperties" : false, |
662 | "required" : [ |
663 | "hexadecimal" |
664 | ] |
665 | } |
666 | ] |
667 | }, |
668 | "ObjIdType" : { |
669 | "type" : "string", |
670 | "subType" : "objid", |
671 | "pattern" : "^[0-2][.][1-3]?[0-9]([.][0-9]|([1-9][0-9]+))*$" |
672 | }, |
673 | "RelObjIdType" : { |
674 | "type" : "string", |
675 | "subType" : "objid", |
676 | "pattern" : "^[0-2][.][1-3]?[0-9]([.][0-9]|([1-9][0-9]+))*$" |
677 | }, |
678 | "Season" : { |
679 | "enum" : [ |
680 | "spring", |
681 | "summer", |
682 | "fall", |
683 | "winter" |
684 | ], |
685 | "numericValues" : [ |
686 | 1, |
687 | 2, |
688 | 3, |
689 | 4 |
690 | ] |
691 | }, |
692 | "SelectionType" : { |
693 | "type" : "array", |
694 | "subType" : "set of", |
695 | "items" : { |
696 | "$ref" : "#/definitions/Zero/Number" |
697 | } |
698 | }, |
699 | "SeqOfInt" : { |
700 | "type" : "array", |
701 | "subType" : "record of", |
702 | "items" : { |
703 | "type" : "integer" |
704 | } |
705 | }, |
706 | "SeqProduct" : { |
707 | "type" : "object", |
708 | "subType" : "record", |
709 | "properties" : { |
710 | "name" : { |
711 | "type" : "string", |
712 | "subType" : "universal charstring" |
713 | }, |
714 | "price" : { |
715 | "anyOf" : [ |
716 | { |
717 | "type" : "number" |
718 | }, |
719 | { |
720 | "enum" : [ |
721 | "not_a_number", |
722 | "infinity", |
723 | "-infinity" |
724 | ] |
725 | } |
726 | ] |
727 | }, |
728 | "id" : { |
729 | "anyOf" : [ |
730 | { |
731 | "type" : "null" |
732 | }, |
733 | { |
734 | "type" : "string", |
735 | "subType" : "octetstring", |
736 | "pattern" : "^([0-9A-Fa-f][0-9A-Fa-f])*$" |
737 | } |
738 | ], |
739 | "omitAsNull" : false |
740 | }, |
741 | "available" : { |
742 | "type" : "boolean" |
743 | } |
744 | }, |
745 | "additionalProperties" : false, |
746 | "fieldOrder" : [ |
747 | "name", |
748 | "price", |
749 | "id", |
750 | "available" |
751 | ], |
752 | "required" : [ |
753 | "name", |
754 | "price", |
755 | "available" |
756 | ] |
757 | } |
758 | } |
759 | }, |
760 | "anyOf" : [ |
761 | { |
3abe9331 |
762 | "$ref" : "#/definitions/two/Intses" |
af710487 |
763 | }, |
764 | { |
765 | "$ref" : "#/definitions/one/Rec", |
766 | "decoding" : { |
767 | "prototype" : [ |
768 | "convert", |
769 | "f_dec_rec", |
770 | "octie" |
771 | ], |
772 | "errorBehavior" : { |
773 | "ALL" : "WARNING", |
774 | "INVAL_MSG" : "ERROR" |
775 | } |
776 | }, |
777 | "encoding" : { |
778 | "prototype" : [ |
779 | "convert", |
780 | "f_enc_rec", |
781 | "x" |
782 | ] |
783 | } |
784 | }, |
3abe9331 |
785 | { |
786 | "$ref" : "#/definitions/two/Ints", |
787 | "decoding" : { |
788 | "prototype" : [ |
789 | "fast", |
790 | "f_dec_ints", |
791 | "os", |
792 | "x" |
793 | ] |
794 | }, |
795 | "encoding" : { |
796 | "prototype" : [ |
797 | "fast", |
798 | "f_enc_ints", |
799 | "eents", |
800 | "octus" |
801 | ], |
802 | "printing" : "pretty" |
803 | } |
804 | }, |
af710487 |
805 | { |
806 | "$ref" : "#/definitions/one/Set" |
807 | }, |
808 | { |
809 | "$ref" : "#/definitions/one/Uni" |
810 | }, |
811 | { |
812 | "$ref" : "#/definitions/one/HasAny" |
813 | }, |
814 | { |
815 | "$ref" : "#/definitions/one/Height" |
816 | }, |
817 | { |
818 | "$ref" : "#/definitions/one/Width" |
819 | }, |
820 | { |
821 | "$ref" : "#/definitions/one/anytype" |
822 | }, |
823 | { |
824 | "$ref" : "#/definitions/three/Thing" |
825 | }, |
826 | { |
827 | "$ref" : "#/definitions/three/Stuff" |
828 | }, |
829 | { |
830 | "$ref" : "#/definitions/three/Barrels" |
831 | }, |
3abe9331 |
832 | { |
833 | "$ref" : "#/definitions/two/Octets" |
834 | }, |
af710487 |
835 | { |
836 | "$ref" : "#/definitions/two/PosInt" |
837 | }, |
838 | { |
839 | "$ref" : "#/definitions/Zero/SeqOfInt" |
840 | }, |
841 | { |
842 | "$ref" : "#/definitions/Zero/SeqProduct" |
843 | }, |
844 | { |
845 | "$ref" : "#/definitions/Zero/Number" |
846 | }, |
847 | { |
848 | "$ref" : "#/definitions/three/Nums" |
849 | }, |
850 | { |
851 | "$ref" : "#/definitions/three/Numz" |
852 | }, |
853 | { |
854 | "$ref" : "#/definitions/three/Rex" |
855 | }, |
856 | { |
857 | "$ref" : "#/definitions/Zero/AnyString" |
858 | }, |
859 | { |
860 | "$ref" : "#/definitions/Zero/ManyStrings" |
861 | }, |
862 | { |
863 | "$ref" : "#/definitions/Zero/Big_Set", |
864 | "decoding" : { |
865 | "prototype" : [ |
866 | "convert", |
867 | "f_dec_bigset", |
868 | "os" |
869 | ] |
870 | }, |
871 | "encoding" : { |
872 | "prototype" : [ |
873 | "convert", |
874 | "f_enc_bigset", |
875 | "x" |
876 | ] |
877 | } |
878 | }, |
879 | { |
880 | "$ref" : "#/definitions/Zero/Big_Choice" |
881 | }, |
882 | { |
883 | "$ref" : "#/definitions/Zero/Season" |
884 | }, |
885 | { |
886 | "$ref" : "#/definitions/Zero/SelectionType" |
887 | }, |
888 | { |
889 | "$ref" : "#/definitions/Zero/NullType" |
890 | }, |
891 | { |
892 | "$ref" : "#/definitions/Zero/ObjIdType" |
893 | }, |
894 | { |
895 | "$ref" : "#/definitions/Zero/RelObjIdType" |
896 | } |
897 | ] |
898 | } |