@@ -49,7 +49,7 @@ var _ = Describe("AllOf Flattening", func() {
4949 By ("flattening a schema with at one branch set as Nullable" )
5050 original := & apiext.JSONSchemaProps {
5151 Properties : map [string ]apiext.JSONSchemaProps {
52- "multiNullable" : apiext. JSONSchemaProps {
52+ "multiNullable" : {
5353 AllOf : []apiext.JSONSchemaProps {
5454 {Nullable : true }, {Nullable : false }, {Nullable : false },
5555 },
@@ -62,7 +62,7 @@ var _ = Describe("AllOf Flattening", func() {
6262 By ("ensuring that the result has no branches and is nullable" )
6363 Expect (flattened ).To (Equal (& apiext.JSONSchemaProps {
6464 Properties : map [string ]apiext.JSONSchemaProps {
65- "multiNullable" : apiext. JSONSchemaProps {Nullable : true },
65+ "multiNullable" : {Nullable : true },
6666 },
6767 }))
6868 })
@@ -71,7 +71,7 @@ var _ = Describe("AllOf Flattening", func() {
7171 By ("flattening a schema with at no branches set as Nullable" )
7272 original := & apiext.JSONSchemaProps {
7373 Properties : map [string ]apiext.JSONSchemaProps {
74- "multiNullable" : apiext. JSONSchemaProps {
74+ "multiNullable" : {
7575 AllOf : []apiext.JSONSchemaProps {
7676 {Nullable : false }, {Nullable : false }, {Nullable : false },
7777 },
@@ -84,7 +84,7 @@ var _ = Describe("AllOf Flattening", func() {
8484 By ("ensuring that the result has no branches and is not nullable" )
8585 Expect (flattened ).To (Equal (& apiext.JSONSchemaProps {
8686 Properties : map [string ]apiext.JSONSchemaProps {
87- "multiNullable" : apiext. JSONSchemaProps {Nullable : false },
87+ "multiNullable" : {Nullable : false },
8888 },
8989 }))
9090 })
@@ -113,7 +113,7 @@ var _ = Describe("AllOf Flattening", func() {
113113 defOne := int64 (1 )
114114 original := & apiext.JSONSchemaProps {
115115 Properties : map [string ]apiext.JSONSchemaProps {
116- "multiAdditionalProps" : apiext. JSONSchemaProps {
116+ "multiAdditionalProps" : {
117117 AllOf : []apiext.JSONSchemaProps {
118118 {
119119 AdditionalProperties : & apiext.JSONSchemaPropsOrBool {Schema : & apiext.JSONSchemaProps {
@@ -145,7 +145,7 @@ var _ = Describe("AllOf Flattening", func() {
145145 By ("ensuring that the result has the minimal set of AllOf branches required, pushed inside AdditionalProperites" )
146146 Expect (flattened ).To (Equal (& apiext.JSONSchemaProps {
147147 Properties : map [string ]apiext.JSONSchemaProps {
148- "multiAdditionalProps" : apiext. JSONSchemaProps {
148+ "multiAdditionalProps" : {
149149 AdditionalProperties : & apiext.JSONSchemaPropsOrBool {Schema : & apiext.JSONSchemaProps {
150150 Nullable : true ,
151151 MaxLength : & defSeven ,
@@ -164,7 +164,7 @@ var _ = Describe("AllOf Flattening", func() {
164164 By ("flattening a schema with a single property with two different types" )
165165 crd .FlattenEmbedded (& apiext.JSONSchemaProps {
166166 Properties : map [string ]apiext.JSONSchemaProps {
167- "multiType" : apiext. JSONSchemaProps {AllOf : []apiext.JSONSchemaProps {{Type : "string" }, {Type : "int" }}},
167+ "multiType" : {AllOf : []apiext.JSONSchemaProps {{Type : "string" }, {Type : "int" }}},
168168 },
169169 }, errRec )
170170
@@ -202,21 +202,21 @@ var _ = Describe("AllOf Flattening", func() {
202202 AllOf : []apiext.JSONSchemaProps {
203203 {
204204 Properties : map [string ]apiext.JSONSchemaProps {
205- "nonConflicting" : apiext. JSONSchemaProps {Type : "string" },
206- "conflicting1" : apiext. JSONSchemaProps {Type : "string" , Format : "date-time" },
207- "nonConflictingDup" : apiext. JSONSchemaProps {Type : "bool" },
205+ "nonConflicting" : {Type : "string" },
206+ "conflicting1" : {Type : "string" , Format : "date-time" },
207+ "nonConflictingDup" : {Type : "bool" },
208208 },
209209 },
210210 {
211211 Properties : map [string ]apiext.JSONSchemaProps {
212- "conflicting1" : apiext. JSONSchemaProps {Type : "string" , MinLength : & defOne },
213- "conflicting2" : apiext. JSONSchemaProps {Type : "int" , MultipleOf : & defSeven },
212+ "conflicting1" : {Type : "string" , MinLength : & defOne },
213+ "conflicting2" : {Type : "int" , MultipleOf : & defSeven },
214214 },
215215 },
216216 {
217217 Properties : map [string ]apiext.JSONSchemaProps {
218- "conflicting2" : apiext. JSONSchemaProps {Type : "int" , MultipleOf : & defEight },
219- "nonConflictingDup" : apiext. JSONSchemaProps {Type : "bool" },
218+ "conflicting2" : {Type : "int" , MultipleOf : & defEight },
219+ "nonConflictingDup" : {Type : "bool" },
220220 },
221221 },
222222 },
@@ -227,14 +227,14 @@ var _ = Describe("AllOf Flattening", func() {
227227 By ("ensuring that the result has the minimal set of AllOf branches required, pushed inside Properties" )
228228 Expect (flattened ).To (Equal (& apiext.JSONSchemaProps {
229229 Properties : map [string ]apiext.JSONSchemaProps {
230- "nonConflicting" : apiext. JSONSchemaProps {Type : "string" },
231- "nonConflictingDup" : apiext. JSONSchemaProps {Type : "bool" },
232- "conflicting1" : apiext. JSONSchemaProps {
230+ "nonConflicting" : {Type : "string" },
231+ "nonConflictingDup" : {Type : "bool" },
232+ "conflicting1" : {
233233 Type : "string" ,
234234 Format : "date-time" ,
235235 MinLength : & defOne ,
236236 },
237- "conflicting2" : apiext. JSONSchemaProps {
237+ "conflicting2" : {
238238 Type : "int" ,
239239 AllOf : []apiext.JSONSchemaProps {{MultipleOf : & defSeven }, {MultipleOf : & defEight }},
240240 },
@@ -297,9 +297,9 @@ var _ = Describe("AllOf Flattening", func() {
297297 AllOf : []apiext.JSONSchemaProps {
298298 {
299299 Properties : map [string ]apiext.JSONSchemaProps {
300- "prop1" : apiext. JSONSchemaProps {
300+ "prop1" : {
301301 Properties : map [string ]apiext.JSONSchemaProps {
302- "prop2" : apiext. JSONSchemaProps {
302+ "prop2" : {
303303 Type : "string" ,
304304 Pattern : "^[abc]+$" ,
305305 },
@@ -309,9 +309,9 @@ var _ = Describe("AllOf Flattening", func() {
309309 },
310310 {
311311 Properties : map [string ]apiext.JSONSchemaProps {
312- "prop1" : apiext. JSONSchemaProps {
312+ "prop1" : {
313313 Properties : map [string ]apiext.JSONSchemaProps {
314- "prop2" : apiext. JSONSchemaProps {
314+ "prop2" : {
315315 Pattern : "^(bc)+$" ,
316316 },
317317 },
@@ -326,9 +326,9 @@ var _ = Describe("AllOf Flattening", func() {
326326 By ("ensuring that the result has the minimal AllOf branches possible" )
327327 Expect (flattened ).To (Equal (& apiext.JSONSchemaProps {
328328 Properties : map [string ]apiext.JSONSchemaProps {
329- "prop1" : apiext. JSONSchemaProps {
329+ "prop1" : {
330330 Properties : map [string ]apiext.JSONSchemaProps {
331- "prop2" : apiext. JSONSchemaProps {
331+ "prop2" : {
332332 Type : "string" ,
333333 AllOf : []apiext.JSONSchemaProps {{Pattern : "^[abc]+$" }, {Pattern : "^(bc)+$" }},
334334 },
0 commit comments