[BUG][JAVA] Content type of response seems to be ignored and always set to application/json
Created by: TimFaehrtBahn
Description
The defined content type within the open api spec seems to be ignored. The generated code always contains "application/json".
openapi-generator version
openapi-generator-cli-4.3.1.jar
OpenAPI declaration file content or url
[...]
"200": {
"description": "Success",
"headers": {
"Cache-Control": {
"description": "Controls whether and how long response can be cached by consumers, defaults to 'no-cache, no-store'.",
"style": "simple",
"schema": {
"type": "string"
}
}
},
"content": {
"application/vnd.de.db.ris+json": {
"schema": {
"$ref": "#/components/schemas/BoardPublicArrival"
}
}
}
}
[...]
##### Command line used for generation
java -jar openapi-generator-cli-4.3.1.jar generate -g java -i swagger.yml --library native --api-package innoapi.api --invoker-package innoapi.invoker --model-package innoapi.model
##### Steps to reproduce
Look in the code and the accept header.
`
localVarRequestBuilder.header("Accept", "application/json");
`
##### Related issues/PRs
/
##### Suggest a fix
Content type has to evaulated for setting the accept header.