Open krzema12 opened 2 years ago
It looks correct to me.
"responseBody": {
"type": "array",
"items": {
"type": "string",
"format": "byte"
}
}
This should generate a List<Base64ByteArray >
if you just want a byte[]
"responseBody": {
"type": "string",
"format": "byte"
}
Bug Report Checklist
Description
I have a field in my Java DTO that is of type
byte[]
. Swagger spec generated for it looks like this:openapi-generator version
6.0.1-SNAPSHOT
OpenAPI declaration file content or url
Generation Details
Related issues/PRs
None found.
Suggest a fix
It looks straightforward - an array of bytes should be mapped to just
Base64ByteArray
, notList<Base64ByteArray>
. Regarding place in the code, probably something around this place: https://github.com/OpenAPITools/openapi-generator/blob/b02fd28ba638a606785c952d1227f15dfd8660bf/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java#L701