OpenAPITools / OpenAPITools/openapi-generator

[BUG][typescript-angular] Can't handle multiple responses

Open
#13,425 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

According to the OpenAPI specification it is possible to have multiple response objects per request. The generated code does not represent that.

openapi-generator version

6.1.0
and also reproduced on master

OpenAPI declaration file content or url

TBD

Generation Details

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i modules/openapi-generator-cli/openapi.yml -g typescript-angular -o typescript-angular

Steps to reproduce

Run the command and check the generated code.

Related issues/PRs

https://github.com/OpenAPITools/openapi-generator/issues/5099
https://github.com/OpenAPITools/openapi-generator/issues/1096

Suggest a fix

TBD

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the documented typescript-angular generation command with modules/openapi-generator-cli/openapi.yml and inspect the generated code. The issue does not provide a minimal OpenAPI declaration or actual-versus-expected output, so first establish a reproducible multi-response case and review the related issues. Done means the generated code represents multiple response objects correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
api, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.