Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.x, 4.x
-
None
-
Unknown
Description
When specifying an array of objects as a request type (in PUT/POST methods), the generated OpenAPI schema does not match the expected result.
For example:
.post()
.type(User[].class)
.to("bean:....")
Will generate:
"requestBody" : { "description" : "", "content" : { "application/json" : { "schema" : { "type" : "string" } } }, "required" : true },
While expected schema should be:
"requestBody" : { "description" : "", "content" : { "application/json" : { "schema" : { "type" : "array", "items" : { "$ref" : "#/components/schemas/User" } } } }, "required" : true }