Bug Report Checklist
Description
If the consumer does not explicitly define the content type (in Java con consumes = MediaType.APPLICATION_JSON_VALUE) then the generated TypeScript code is like
public saveOrder(orderId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: '*/*', context?: HttpContext}): Observable<Angebot>;
Important is httpHeaderAccept?: '*/*',
This leads to the fact that in the following generated lines
let responseType_: 'text' | 'json' | 'blob' = 'json';
if (localVarHttpHeaderAcceptSelected) {
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
}
the responseType is set to 'blob'. I don't think that was intended.
openapi-generator version
This Bug exists since version 5.4.0.
Suggest a fix
Consider also the case */* in the code above.
Bug Report Checklist
Description
If the consumer does not explicitly define the content type (in Java con
consumes = MediaType.APPLICATION_JSON_VALUE) then the generated TypeScript code is likeImportant is
httpHeaderAccept?: '*/*',This leads to the fact that in the following generated lines
the responseType is set to 'blob'. I don't think that was intended.
openapi-generator version
This Bug exists since version 5.4.0.
Suggest a fix
Consider also the case
*/*in the code above.