You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
A runtime exception occurs when invoking a service method using options {httpHeaderAccept: 'application/pdf'} when that route supports multiple media
types because it appears to be treated as JSON in the generated service code.
openapi-generator version
<= 5.3.0
OpenAPI declaration file content or url
openapi: 3.0.0info:
version: '1.0'title: Document APIpaths:
/document:
get:
summary: Returns a document.responses:
'200':
description: Found a document.content:
text/plain:
schema:
type: stringapplication/pdf:
schema:
type: stringformat: binary
Bug Report Checklist
Description
A runtime exception occurs when invoking a service method using options
{httpHeaderAccept: 'application/pdf'}
when that route supports multiple mediatypes because it appears to be treated as JSON in the generated service code.
openapi-generator version
<= 5.3.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Generate a client using the provided OpenAPI spec and command. Invoke the
documentGet
method ofdefault.service.ts
.Related issues/PRs
None.
Suggest a fix
A minimal fix would be to expand the logic to decide the response type found in
the
api.service.mustache
template to includeblob
MIME types.The text was updated successfully, but these errors were encountered: