@@ -272,10 +272,26 @@ func TestGetSchemaValue_RequestBodyParameters(t *testing.T) {
272
272
name : "object with array" ,
273
273
schema : `{openapi: 3.0.2, servers: [{url: 'http://localhost:8080'}], paths: {/: {post: {requestBody: {content: {'application/json': {schema: {type: object, properties: {name: {type: array, items: {type: string}}}}}}}, responses: {'204': {}}}}}}` ,
274
274
},
275
+ {
276
+ name : "object with array with 10 depth properties" ,
277
+ schema : `{openapi: 3.0.2, servers: [{url: 'http://localhost:8080'}], paths: {/: {post: {requestBody: {content: {'application/json': {schema: {type: object, properties: {name: {type: array, items: {type: object, properties: {subname: {type: array, items: {type: object, properties: {subsubname: {type: array, items: {type: object, properties: {subsubsubname: {type: array, items: {type: object, properties: {subsubsubsubname: {type: array, items: {type: object, properties: {subsubsubsubsubname: {type: array, items: {type: object, properties: {subsubsubsubsubsubname: {type: array, items: {type: object, properties: {subsubsubsubsubsubsubname: {type: array, items: {type: object, properties: {subsubsubsubsubsubsubsubname: {type: array, items: {type: object, properties: {subsubsubsubsubsubsubsubsubname: {type: array, items: {type: string }}} }}} }}} }}} }}} }}} }}} }}} }}} }}}}}}}}, responses: {'204': {}}}}}}` ,
278
+ },
275
279
{
276
280
name : "object with object" ,
277
281
schema : `{openapi: 3.0.2, servers: [{url: 'http://localhost:8080'}], paths: {/: {post: {requestBody: {content: {'application/json': {schema: {type: object, properties: {name: {type: object, properties: {subname: {type: string}}}}}}}}, responses: {'204': {}}}}}}` ,
278
282
},
283
+ {
284
+ name : "object with missing properties" ,
285
+ schema : `{openapi: 3.0.2, servers: [{url: 'http://localhost:8080'}], paths: {/: {post: {requestBody: {content: {'application/json': {schema: {type: object}}}}, responses: {'204': {}}}}}}` ,
286
+ },
287
+ {
288
+ name : "object with 4 depth properties" ,
289
+ schema : `{openapi: 3.0.2, servers: [{url: 'http://localhost:8080'}], paths: {/: {post: {requestBody: {content: {'application/json': {schema: {type: object, properties: {name: {type: object, properties: {subname: {type: object, properties: {subsubname: {type: object, properties: {subsubsubname: {type: string}}}}}}}}}}}}, responses: {'204': {}}}}}}` ,
290
+ },
291
+ {
292
+ name : "object with 10 depth properties" ,
293
+ schema : `{openapi: 3.0.2, servers: [{url: 'http://localhost:8080'}], paths: {/: {post: {requestBody: {content: {'application/json': {schema: {type: object, properties: {name: {type: object, properties: {subname: {type: object, properties: {subsubname: {type: object, properties: {subsubsubname: {type: object, properties: {subsubsubsubname: {type: object, properties: {subsubsubsubsubname: {type: object, properties: {subsubsubsubsubsubname: {type: object, properties: {subsubsubsubsubsubsubname: {type: object, properties: {subsubsubsubsubsubsubsubname: {type: object, properties: {subsubsubsubsubsubsubsubsubname: {type: string }}} }}}}}}}}}}}}}}}}}}}}}}}, responses: {'204': {}}}}}}` ,
294
+ },
279
295
}
280
296
281
297
for _ , tt := range tests {
0 commit comments