Debian Codegraph @

test/integration/testdata/golden.v2.json

raw
1 {
2 "swagger": "2.0",
3 "info": {
4 "title": "Integration Test",
5 "version": "1.0"
6 },
7 "paths": {
8 "/test/custom": {
9 "post": {
10 "produces": [
11 "application/json"
12 ],
13 "schemes": [
14 "https"
15 ],
16 "operationId": "create-custom.Bah",
17 "responses": {
18 "201": {
19 "description": "Created",
20 "schema": {
21 "$ref": "#/definitions/custom.Bah"
22 }
23 },
24 "404": {
25 "$ref": "#/responses/NotFound"
26 }
27 }
28 }
29 },
30 "/test/custom/bac": {
31 "get": {
32 "produces": [
33 "application/json"
34 ],
35 "schemes": [
36 "https"
37 ],
38 "operationId": "get-custom.Bac",
39 "responses": {
40 "200": {
41 "description": "OK",
42 "schema": {
43 "$ref": "#/definitions/custom.Bac"
44 }
45 },
46 "404": {
47 "$ref": "#/responses/NotFound"
48 }
49 }
50 }
51 },
52 "/test/custom/bah": {
53 "get": {
54 "produces": [
55 "application/json"
56 ],
57 "schemes": [
58 "https"
59 ],
60 "operationId": "get-custom.Bah",
61 "responses": {
62 "200": {
63 "description": "OK",
64 "schema": {
65 "$ref": "#/definitions/custom.Bah"
66 }
67 },
68 "404": {
69 "$ref": "#/responses/NotFound"
70 }
71 }
72 }
73 },
74 "/test/custom/bak": {
75 "get": {
76 "produces": [
77 "application/json"
78 ],
79 "schemes": [
80 "https"
81 ],
82 "operationId": "get-custom.Bak",
83 "responses": {
84 "200": {
85 "description": "OK",
86 "schema": {
87 "$ref": "#/definitions/custom.Bak"
88 }
89 },
90 "404": {
91 "$ref": "#/responses/NotFound"
92 }
93 }
94 }
95 },
96 "/test/custom/bal": {
97 "get": {
98 "produces": [
99 "application/json"
100 ],
101 "schemes": [
102 "https"
103 ],
104 "operationId": "get-custom.Bal",
105 "responses": {
106 "200": {
107 "description": "OK",
108 "schema": {
109 "$ref": "#/definitions/custom.Bal"
110 }
111 },
112 "404": {
113 "$ref": "#/responses/NotFound"
114 }
115 }
116 }
117 },
118 "/test/defaults": {
119 "post": {
120 "produces": [
121 "application/json"
122 ],
123 "schemes": [
124 "https"
125 ],
126 "operationId": "create-defaults.Defaulted",
127 "responses": {
128 "201": {
129 "description": "Created",
130 "schema": {
131 "$ref": "#/definitions/defaults.Defaulted"
132 }
133 },
134 "404": {
135 "$ref": "#/responses/NotFound"
136 }
137 }
138 }
139 },
140 "/test/defaults/defaulted": {
141 "get": {
142 "produces": [
143 "application/json"
144 ],
145 "schemes": [
146 "https"
147 ],
148 "operationId": "get-defaults.Defaulted",
149 "responses": {
150 "200": {
151 "description": "OK",
152 "schema": {
153 "$ref": "#/definitions/defaults.Defaulted"
154 }
155 },
156 "404": {
157 "$ref": "#/responses/NotFound"
158 }
159 }
160 }
161 },
162 "/test/dummytype": {
163 "post": {
164 "produces": [
165 "application/json"
166 ],
167 "schemes": [
168 "https"
169 ],
170 "operationId": "create-dummytype.Waldo",
171 "responses": {
172 "201": {
173 "description": "Created",
174 "schema": {
175 "$ref": "#/definitions/dummytype.Waldo"
176 }
177 },
178 "404": {
179 "$ref": "#/responses/NotFound"
180 },
181 "500": {
182 "description": "Internal Service Error",
183 "schema": {
184 "$ref": "#/definitions/dummytype.StatusError"
185 }
186 }
187 }
188 }
189 },
190 "/test/dummytype/bar": {
191 "get": {
192 "produces": [
193 "application/json"
194 ],
195 "schemes": [
196 "https"
197 ],
198 "operationId": "get-dummytype.Bar",
199 "responses": {
200 "404": {
201 "$ref": "#/responses/NotFound"
202 },
203 "500": {
204 "description": "Internal Service Error",
205 "schema": {
206 "$ref": "#/definitions/dummytype.StatusError"
207 }
208 }
209 }
210 }
211 },
212 "/test/dummytype/baz": {
213 "get": {
214 "produces": [
215 "application/json"
216 ],
217 "schemes": [
218 "https"
219 ],
220 "operationId": "get-dummytype.Baz",
221 "responses": {
222 "404": {
223 "$ref": "#/responses/NotFound"
224 },
225 "500": {
226 "description": "Internal Service Error",
227 "schema": {
228 "$ref": "#/definitions/dummytype.StatusError"
229 }
230 }
231 }
232 }
233 },
234 "/test/dummytype/foo": {
235 "get": {
236 "produces": [
237 "application/json"
238 ],
239 "schemes": [
240 "https"
241 ],
242 "operationId": "get-dummytype.Foo",
243 "responses": {
244 "404": {
245 "$ref": "#/responses/NotFound"
246 },
247 "500": {
248 "description": "Internal Service Error",
249 "schema": {
250 "$ref": "#/definitions/dummytype.StatusError"
251 }
252 }
253 }
254 }
255 },
256 "/test/dummytype/waldo": {
257 "get": {
258 "produces": [
259 "application/json"
260 ],
261 "schemes": [
262 "https"
263 ],
264 "operationId": "get-dummytype.Waldo",
265 "responses": {
266 "404": {
267 "$ref": "#/responses/NotFound"
268 },
269 "500": {
270 "description": "Internal Service Error",
271 "schema": {
272 "$ref": "#/definitions/dummytype.StatusError"
273 }
274 }
275 }
276 }
277 },
278 "/test/listtype": {
279 "post": {
280 "produces": [
281 "application/json"
282 ],
283 "schemes": [
284 "https"
285 ],
286 "operationId": "create-listtype.SetList",
287 "responses": {
288 "201": {
289 "description": "Created",
290 "schema": {
291 "$ref": "#/definitions/listtype.SetList"
292 }
293 },
294 "404": {
295 "$ref": "#/responses/NotFound"
296 }
297 }
298 }
299 },
300 "/test/listtype/atomiclist": {
301 "get": {
302 "produces": [
303 "application/json"
304 ],
305 "schemes": [
306 "https"
307 ],
308 "operationId": "get-listtype.AtomicList",
309 "responses": {
310 "200": {
311 "description": "OK",
312 "schema": {
313 "$ref": "#/definitions/listtype.AtomicList"
314 }
315 },
316 "404": {
317 "$ref": "#/responses/NotFound"
318 }
319 }
320 }
321 },
322 "/test/listtype/maplist": {
323 "get": {
324 "produces": [
325 "application/json"
326 ],
327 "schemes": [
328 "https"
329 ],
330 "operationId": "get-listtype.MapList",
331 "responses": {
332 "200": {
333 "description": "OK",
334 "schema": {
335 "$ref": "#/definitions/listtype.MapList"
336 }
337 },
338 "404": {
339 "$ref": "#/responses/NotFound"
340 }
341 }
342 }
343 },
344 "/test/listtype/setlist": {
345 "get": {
346 "produces": [
347 "application/json"
348 ],
349 "schemes": [
350 "https"
351 ],
352 "operationId": "get-listtype.SetList",
353 "responses": {
354 "200": {
355 "description": "OK",
356 "schema": {
357 "$ref": "#/definitions/listtype.SetList"
358 }
359 },
360 "404": {
361 "$ref": "#/responses/NotFound"
362 }
363 }
364 }
365 },
366 "/test/maptype": {
367 "post": {
368 "produces": [
369 "application/json"
370 ],
371 "schemes": [
372 "https"
373 ],
374 "operationId": "create-maptype.AtomicMap",
375 "responses": {
376 "201": {
377 "description": "Created",
378 "schema": {
379 "$ref": "#/definitions/maptype.AtomicMap"
380 }
381 },
382 "404": {
383 "$ref": "#/responses/NotFound"
384 }
385 }
386 }
387 },
388 "/test/maptype/atomicmap": {
389 "get": {
390 "produces": [
391 "application/json"
392 ],
393 "schemes": [
394 "https"
395 ],
396 "operationId": "get-maptype.AtomicMap",
397 "responses": {
398 "200": {
399 "description": "OK",
400 "schema": {
401 "$ref": "#/definitions/maptype.AtomicMap"
402 }
403 },
404 "404": {
405 "$ref": "#/responses/NotFound"
406 }
407 }
408 }
409 },
410 "/test/maptype/granularmap": {
411 "get": {
412 "produces": [
413 "application/json"
414 ],
415 "schemes": [
416 "https"
417 ],
418 "operationId": "get-maptype.GranularMap",
419 "responses": {
420 "200": {
421 "description": "OK",
422 "schema": {
423 "$ref": "#/definitions/maptype.GranularMap"
424 }
425 },
426 "404": {
427 "$ref": "#/responses/NotFound"
428 }
429 }
430 }
431 },
432 "/test/structtype": {
433 "post": {
434 "produces": [
435 "application/json"
436 ],
437 "schemes": [
438 "https"
439 ],
440 "operationId": "create-structtype.DeclaredAtomicStruct",
441 "responses": {
442 "201": {
443 "description": "Created",
444 "schema": {
445 "$ref": "#/definitions/structtype.DeclaredAtomicStruct"
446 }
447 },
448 "404": {
449 "$ref": "#/responses/NotFound"
450 }
451 }
452 }
453 },
454 "/test/structtype/atomicstruct": {
455 "get": {
456 "produces": [
457 "application/json"
458 ],
459 "schemes": [
460 "https"
461 ],
462 "operationId": "get-structtype.AtomicStruct",
463 "responses": {
464 "200": {
465 "description": "OK",
466 "schema": {
467 "$ref": "#/definitions/structtype.AtomicStruct"
468 }
469 },
470 "404": {
471 "$ref": "#/responses/NotFound"
472 }
473 }
474 }
475 },
476 "/test/structtype/declaredatomicstruct": {
477 "get": {
478 "produces": [
479 "application/json"
480 ],
481 "schemes": [
482 "https"
483 ],
484 "operationId": "get-structtype.DeclaredAtomicStruct",
485 "responses": {
486 "200": {
487 "description": "OK",
488 "schema": {
489 "$ref": "#/definitions/structtype.DeclaredAtomicStruct"
490 }
491 },
492 "404": {
493 "$ref": "#/responses/NotFound"
494 }
495 }
496 }
497 },
498 "/test/structtype/fieldleveloverridestruct": {
499 "get": {
500 "produces": [
501 "application/json"
502 ],
503 "schemes": [
504 "https"
505 ],
506 "operationId": "get-structtype.FieldLevelOverrideStruct",
507 "responses": {
508 "200": {
509 "description": "OK",
510 "schema": {
511 "$ref": "#/definitions/structtype.FieldLevelOverrideStruct"
512 }
513 },
514 "404": {
515 "$ref": "#/responses/NotFound"
516 }
517 }
518 }
519 },
520 "/test/structtype/granularstruct": {
521 "get": {
522 "produces": [
523 "application/json"
524 ],
525 "schemes": [
526 "https"
527 ],
528 "operationId": "get-structtype.GranularStruct",
529 "responses": {
530 "200": {
531 "description": "OK",
532 "schema": {
533 "$ref": "#/definitions/structtype.GranularStruct"
534 }
535 },
536 "404": {
537 "$ref": "#/responses/NotFound"
538 }
539 }
540 }
541 },
542 "/test/uniontype": {
543 "post": {
544 "produces": [
545 "application/json"
546 ],
547 "schemes": [
548 "https"
549 ],
550 "operationId": "create-uniontype.InlinedUnion",
551 "responses": {
552 "201": {
553 "description": "Created",
554 "schema": {
555 "$ref": "#/definitions/uniontype.InlinedUnion"
556 }
557 },
558 "404": {
559 "$ref": "#/responses/NotFound"
560 }
561 }
562 }
563 },
564 "/test/uniontype/inlinedunion": {
565 "get": {
566 "produces": [
567 "application/json"
568 ],
569 "schemes": [
570 "https"
571 ],
572 "operationId": "get-uniontype.InlinedUnion",
573 "responses": {
574 "200": {
575 "description": "OK",
576 "schema": {
577 "$ref": "#/definitions/uniontype.InlinedUnion"
578 }
579 },
580 "404": {
581 "$ref": "#/responses/NotFound"
582 }
583 }
584 }
585 },
586 "/test/uniontype/toplevelunion": {
587 "get": {
588 "produces": [
589 "application/json"
590 ],
591 "schemes": [
592 "https"
593 ],
594 "operationId": "get-uniontype.TopLevelUnion",
595 "responses": {
596 "200": {
597 "description": "OK",
598 "schema": {
599 "$ref": "#/definitions/uniontype.TopLevelUnion"
600 }
601 },
602 "404": {
603 "$ref": "#/responses/NotFound"
604 }
605 }
606 }
607 },
608 "/test/valuevalidation": {
609 "post": {
610 "produces": [
611 "application/json"
612 ],
613 "schemes": [
614 "https"
615 ],
616 "operationId": "create-valuevalidation.Foo",
617 "responses": {
618 "201": {
619 "description": "Created",
620 "schema": {
621 "$ref": "#/definitions/valuevalidation.Foo"
622 }
623 },
624 "404": {
625 "$ref": "#/responses/NotFound"
626 }
627 }
628 }
629 },
630 "/test/valuevalidation/foo": {
631 "get": {
632 "produces": [
633 "application/json"
634 ],
635 "schemes": [
636 "https"
637 ],
638 "operationId": "get-valuevalidation.Foo",
639 "responses": {
640 "200": {
641 "description": "OK",
642 "schema": {
643 "$ref": "#/definitions/valuevalidation.Foo"
644 }
645 },
646 "404": {
647 "$ref": "#/responses/NotFound"
648 }
649 }
650 }
651 },
652 "/test/valuevalidation/foo2": {
653 "get": {
654 "produces": [
655 "application/json"
656 ],
657 "schemes": [
658 "https"
659 ],
660 "operationId": "get-valuevalidation.Foo2",
661 "responses": {
662 "200": {
663 "description": "OK",
664 "schema": {
665 "$ref": "#/definitions/valuevalidation.Foo2"
666 }
667 },
668 "404": {
669 "$ref": "#/responses/NotFound"
670 }
671 }
672 }
673 },
674 "/test/valuevalidation/foo3": {
675 "get": {
676 "produces": [
677 "application/json"
678 ],
679 "schemes": [
680 "https"
681 ],
682 "operationId": "get-valuevalidation.Foo3",
683 "responses": {
684 "200": {
685 "description": "OK",
686 "schema": {
687 "$ref": "#/definitions/valuevalidation.Foo3"
688 }
689 },
690 "404": {
691 "$ref": "#/responses/NotFound"
692 }
693 }
694 }
695 },
696 "/test/valuevalidation/foo4": {
697 "get": {
698 "produces": [
699 "application/json"
700 ],
701 "schemes": [
702 "https"
703 ],
704 "operationId": "get-valuevalidation.Foo4",
705 "responses": {
706 "200": {
707 "description": "OK",
708 "schema": {
709 "$ref": "#/definitions/valuevalidation.Foo4"
710 }
711 },
712 "404": {
713 "$ref": "#/responses/NotFound"
714 }
715 }
716 }
717 },
718 "/test/valuevalidation/foo5": {
719 "get": {
720 "produces": [
721 "application/json"
722 ],
723 "schemes": [
724 "https"
725 ],
726 "operationId": "get-valuevalidation.Foo5",
727 "responses": {
728 "200": {
729 "description": "OK",
730 "schema": {
731 "$ref": "#/definitions/valuevalidation.Foo5"
732 }
733 },
734 "404": {
735 "$ref": "#/responses/NotFound"
736 }
737 }
738 }
739 }
740 },
741 "definitions": {
742 "custom.Bac": {
743 "type": "string"
744 },
745 "custom.Bah": {
746 "type": "test-type",
747 "format": "test-format"
748 },
749 "custom.Bak": {
750 "type": "integer"
751 },
752 "custom.Bal": {
753 "type": "string"
754 },
755 "defaults.Defaulted": {
756 "type": "object",
757 "required": [
758 "OtherField",
759 "List",
760 "Sub",
761 "OtherSub",
762 "Map"
763 ],
764 "properties": {
765 "Field": {
766 "type": "string",
767 "default": "bar"
768 },
769 "List": {
770 "type": "array",
771 "default": [
772 "foo",
773 "bar"
774 ],
775 "items": {
776 "type": "string"
777 }
778 },
779 "Map": {
780 "type": "object",
781 "default": {
782 "foo": "bar"
783 },
784 "additionalProperties": {
785 "type": "string"
786 }
787 },
788 "OtherField": {
789 "type": "integer",
790 "format": "int32",
791 "default": 0
792 },
793 "OtherSub": {
794 "default": {},
795 "$ref": "#/definitions/defaults.SubStruct"
796 },
797 "Sub": {
798 "default": {
799 "I": 5,
800 "S": "foo"
801 },
802 "$ref": "#/definitions/defaults.SubStruct"
803 },
804 "defaultedAliasSymbolReference": {
805 "type": "string",
806 "default": "SymbolConstant"
807 },
808 "externalSymbolReference": {
809 "type": "string",
810 "default": "apple"
811 },
812 "fullyQualifiedSymbolReference": {
813 "type": "string",
814 "default": "SymbolConstant"
815 },
816 "localSymbolReference": {
817 "type": "string",
818 "default": "SymbolConstant"
819 },
820 "pointerConversionSymbolReference": {
821 "type": "string",
822 "default": "apple"
823 }
824 }
825 },
826 "defaults.SubStruct": {
827 "type": "object",
828 "required": [
829 "S"
830 ],
831 "properties": {
832 "I": {
833 "type": "integer",
834 "format": "int32",
835 "default": 1
836 },
837 "S": {
838 "type": "string",
839 "default": ""
840 }
841 }
842 },
843 "dummytype.Bar": {
844 "type": "object",
845 "required": [
846 "ViolationBehind",
847 "Violation"
848 ],
849 "properties": {
850 "Violation": {
851 "type": "boolean",
852 "default": false
853 },
854 "ViolationBehind": {
855 "type": "boolean",
856 "default": false
857 }
858 }
859 },
860 "dummytype.Baz": {
861 "type": "object",
862 "required": [
863 "Violation",
864 "ViolationBehind"
865 ],
866 "properties": {
867 "Violation": {
868 "type": "boolean",
869 "default": false
870 },
871 "ViolationBehind": {
872 "type": "boolean",
873 "default": false
874 }
875 }
876 },
877 "dummytype.Foo": {
878 "type": "object",
879 "required": [
880 "Second",
881 "First"
882 ],
883 "properties": {
884 "First": {
885 "type": "integer",
886 "format": "int32",
887 "default": 0
888 },
889 "Second": {
890 "type": "string",
891 "default": ""
892 }
893 }
894 },
895 "dummytype.StatusError": {
896 "type": "object",
897 "required": [
898 "Code",
899 "Message"
900 ],
901 "properties": {
902 "Code": {
903 "type": "integer",
904 "format": "int32",
905 "default": 0
906 },
907 "Message": {
908 "type": "string",
909 "default": ""
910 }
911 }
912 },
913 "dummytype.Waldo": {
914 "type": "object",
915 "required": [
916 "First",
917 "Second"
918 ],
919 "properties": {
920 "First": {
921 "type": "integer",
922 "format": "int32",
923 "default": 0
924 },
925 "Second": {
926 "type": "string",
927 "default": ""
928 }
929 }
930 },
931 "listtype.AtomicList": {
932 "type": "object",
933 "required": [
934 "Field"
935 ],
936 "properties": {
937 "Field": {
938 "type": "array",
939 "items": {
940 "type": "string"
941 },
942 "x-kubernetes-list-type": "atomic"
943 }
944 }
945 },
946 "listtype.Item": {
947 "type": "object",
948 "required": [
949 "Protocol",
950 "Port"
951 ],
952 "properties": {
953 "Port": {
954 "type": "integer",
955 "format": "int32",
956 "default": 0
957 },
958 "Protocol": {
959 "type": "string",
960 "default": ""
961 },
962 "a": {
963 "type": "integer",
964 "format": "int32",
965 "default": 0
966 },
967 "b": {
968 "type": "integer",
969 "format": "int32"
970 },
971 "c": {
972 "type": "integer",
973 "format": "int32",
974 "default": 0
975 }
976 }
977 },
978 "listtype.MapList": {
979 "type": "object",
980 "required": [
981 "Field"
982 ],
983 "properties": {
984 "Field": {
985 "type": "array",
986 "items": {
987 "$ref": "#/definitions/listtype.Item"
988 },
989 "x-kubernetes-list-map-keys": [
990 "port"
991 ],
992 "x-kubernetes-list-type": "map"
993 }
994 }
995 },
996 "listtype.SetList": {
997 "type": "object",
998 "required": [
999 "Field"
1000 ],
1001 "properties": {
1002 "Field": {
1003 "type": "array",
1004 "items": {
1005 "type": "string"
1006 },
1007 "x-kubernetes-list-type": "set"
1008 }
1009 }
1010 },
1011 "maptype.AtomicMap": {
1012 "type": "object",
1013 "required": [
1014 "KeyValue"
1015 ],
1016 "properties": {
1017 "KeyValue": {
1018 "type": "object",
1019 "additionalProperties": {
1020 "type": "string"
1021 },
1022 "x-kubernetes-map-type": "atomic"
1023 }
1024 }
1025 },
1026 "maptype.GranularMap": {
1027 "type": "object",
1028 "required": [
1029 "KeyValue"
1030 ],
1031 "properties": {
1032 "KeyValue": {
1033 "type": "object",
1034 "additionalProperties": {
1035 "type": "string"
1036 },
1037 "x-kubernetes-map-type": "granular"
1038 }
1039 }
1040 },
1041 "structtype.AtomicStruct": {
1042 "type": "object",
1043 "required": [
1044 "Field",
1045 "OtherField"
1046 ],
1047 "properties": {
1048 "Field": {
1049 "default": {},
1050 "$ref": "#/definitions/structtype.ContainedStruct",
1051 "x-kubernetes-map-type": "atomic"
1052 },
1053 "OtherField": {
1054 "type": "integer",
1055 "format": "int32",
1056 "default": 0
1057 }
1058 }
1059 },
1060 "structtype.ContainedStruct": {
1061 "type": "object"
1062 },
1063 "structtype.DeclaredAtomicStruct": {
1064 "type": "object",
1065 "required": [
1066 "Field"
1067 ],
1068 "properties": {
1069 "Field": {
1070 "type": "integer",
1071 "format": "int32",
1072 "default": 0
1073 }
1074 },
1075 "x-kubernetes-map-type": "atomic"
1076 },
1077 "structtype.FieldLevelOverrideStruct": {
1078 "type": "object",
1079 "required": [
1080 "Field",
1081 "OtherField"
1082 ],
1083 "properties": {
1084 "Field": {
1085 "default": {},
1086 "$ref": "#/definitions/structtype.DeclaredAtomicStruct",
1087 "x-kubernetes-map-type": "atomic"
1088 },
1089 "OtherField": {
1090 "type": "integer",
1091 "format": "int32",
1092 "default": 0
1093 }
1094 }
1095 },
1096 "structtype.GranularStruct": {
1097 "type": "object",
1098 "required": [
1099 "Field",
1100 "OtherField"
1101 ],
1102 "properties": {
1103 "Field": {
1104 "default": {},
1105 "$ref": "#/definitions/structtype.ContainedStruct",
1106 "x-kubernetes-map-type": "granular"
1107 },
1108 "OtherField": {
1109 "type": "integer",
1110 "format": "int32",
1111 "default": 0
1112 }
1113 }
1114 },
1115 "uniontype.InlinedUnion": {
1116 "type": "object",
1117 "required": [
1118 "name",
1119 "type"
1120 ],
1121 "properties": {
1122 "alpha": {
1123 "type": "integer",
1124 "format": "int32"
1125 },
1126 "beta": {
1127 "type": "integer",
1128 "format": "int32"
1129 },
1130 "field1": {
1131 "type": "integer",
1132 "format": "int32"
1133 },
1134 "field2": {
1135 "type": "integer",
1136 "format": "int32"
1137 },
1138 "fieldA": {
1139 "type": "integer",
1140 "format": "int32"
1141 },
1142 "fieldB": {
1143 "type": "integer",
1144 "format": "int32"
1145 },
1146 "name": {
1147 "type": "string",
1148 "default": ""
1149 },
1150 "type": {
1151 "type": "string",
1152 "default": ""
1153 },
1154 "unionType": {
1155 "type": "string",
1156 "default": ""
1157 }
1158 },
1159 "x-kubernetes-unions": [
1160 {
1161 "discriminator": "unionType",
1162 "fields-to-discriminateBy": {
1163 "fieldA": "FieldA",
1164 "fieldB": "FieldB"
1165 }
1166 },
1167 {
1168 "discriminator": "type",
1169 "fields-to-discriminateBy": {
1170 "alpha": "Alpha",
1171 "beta": "Beta"
1172 }
1173 },
1174 {
1175 "fields-to-discriminateBy": {
1176 "field1": "Field1",
1177 "field2": "Field2"
1178 }
1179 }
1180 ]
1181 },
1182 "uniontype.TopLevelUnion": {
1183 "type": "object",
1184 "required": [
1185 "name"
1186 ],
1187 "properties": {
1188 "fieldA": {
1189 "type": "integer",
1190 "format": "int32"
1191 },
1192 "fieldB": {
1193 "type": "integer",
1194 "format": "int32"
1195 },
1196 "name": {
1197 "type": "string",
1198 "default": ""
1199 },
1200 "unionType": {
1201 "type": "string",
1202 "default": ""
1203 }
1204 },
1205 "x-kubernetes-unions": [
1206 {
1207 "discriminator": "unionType",
1208 "fields-to-discriminateBy": {
1209 "fieldA": "FieldA",
1210 "fieldB": "FieldB"
1211 }
1212 }
1213 ]
1214 },
1215 "valuevalidation.Foo": {
1216 "type": "object",
1217 "maxProperties": 5,
1218 "minProperties": 1,
1219 "required": [
1220 "ArrayValue",
1221 "MapValue"
1222 ],
1223 "properties": {
1224 "ArrayValue": {
1225 "type": "array",
1226 "maxItems": 5,
1227 "minItems": 1,
1228 "uniqueItems": true,
1229 "items": {
1230 "type": "string"
1231 }
1232 },
1233 "MapValue": {
1234 "type": "object",
1235 "maxProperties": 5,
1236 "minProperties": 1,
1237 "additionalProperties": {
1238 "type": "string"
1239 }
1240 },
1241 "NumberValue": {
1242 "type": "number",
1243 "format": "double",
1244 "maximum": 5,
1245 "exclusiveMaximum": true,
1246 "minimum": 1,
1247 "exclusiveMinimum": true,
1248 "multipleOf": 2
1249 },
1250 "StringValue": {
1251 "type": "string",
1252 "maxLength": 5,
1253 "minLength": 1,
1254 "pattern": "^a.*b$"
1255 },
1256 "celField": {
1257 "type": "string",
1258 "default": "",
1259 "x-kubernetes-validations": [
1260 {
1261 "message": "string message",
1262 "rule": "self.length() \u003e 0"
1263 },
1264 {
1265 "messageExpression": "self + ' hello'",
1266 "rule": "self.length() % 2 == 0"
1267 }
1268 ]
1269 }
1270 },
1271 "x-kubernetes-validations": [
1272 {
1273 "message": "foo",
1274 "rule": "self == oldSelf"
1275 }
1276 ]
1277 },
1278 "valuevalidation.Foo2": {
1279 "description": "This one has an open API v3 definition",
1280 "type": "test-type",
1281 "format": "test-format",
1282 "maxProperties": 5,
1283 "x-kubernetes-validations": [
1284 {
1285 "message": "foo2",
1286 "rule": "self == oldSelf"
1287 }
1288 ]
1289 },
1290 "valuevalidation.Foo3": {
1291 "description": "This one has a OneOf",
1292 "type": "string",
1293 "format": "string",
1294 "maxProperties": 5,
1295 "x-kubernetes-validations": [
1296 {
1297 "message": "foo3",
1298 "rule": "self == oldSelf"
1299 }
1300 ]
1301 },
1302 "valuevalidation.Foo4": {
1303 "type": "integer"
1304 },
1305 "valuevalidation.Foo5": {
1306 "type": "test-type",
1307 "format": "test-format",
1308 "maxProperties": 5,
1309 "minProperties": 1,
1310 "x-kubernetes-validations": [
1311 {
1312 "message": "foo5",
1313 "rule": "self == oldSelf"
1314 }
1315 ]
1316 }
1317 },
1318 "responses": {
1319 "NotFound": {
1320 "description": "Entity not found."
1321 }
1322 }
1323 }