OpenAPITools / OpenAPITools/openapi-generator

[Ruby] Incorrect return types if multiple responses are defined

Open
#7,714 0 comments 0 reactions 0 assignees View on GitHub

@uyermolkin-hubspot is already working on this.

Since Oct 9, 2020.

  • #7634 by @uyermolkin-hubspot — open
Client: Ruby
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

If you define multiple responses, the codegen will only support the first one (typically 200).

openapi-generator version

4.3.1 and higher

OpenAPI declaration file content or url
test001
Related issues/PRs
PHP

https://github.com/OpenAPITools/openapi-generator/issues/125

Python

https://github.com/OpenAPITools/openapi-generator/issues/7426

Suggest a fix/enhancement

https://github.com/OpenAPITools/openapi-generator/pull/7634

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 with the OpenAPI declaration shown in the issue and inspect how the Ruby generator handles operations with multiple responses. Review the proposed fix in PR 7634 and related PHP and Python issues; done means generated Ruby clients expose correct return types for every defined response.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, ruby
Domain
api, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.