Debian Codegraph @

test/integration/testdata/golden.v3.json

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