OpenAPITools / OpenAPITools/openapi-generator
[BUG][Ruby] Pull Request #15162 Breaks Ruby Server Index Functionality
Nobody has claimed this yet.
- 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?
- [x ] Have you validated the input using an OpenAPI validator (example)?
- [ x] Have you tested with the latest master to confirm the issue still exists?
- [ x] Have you searched for related issues/PRs?
- [x ] What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
openapi-generator version
6.6.0, regression
OpenAPI declaration file content or url
openapi: "3.0.3"
info:
title: Service
description: Service responsible for being a service
version: "1.0"
servers:
- url: http://localhost:8080
description: local server
- url: https://staging-server.example.com
description: staging server
- url: https://prod-server.example.com
description: production server
paths:
/v1/endpoint:
$ref: "./api/v1/service.yaml#/~services"
Usage:
Client.configure do |config|
config.access_token = @http_token
config.server_index = 2
end
Generation Details
Steps to reproduce
In https://github.com/OpenAPITools/openapi-generator/pull/15162, functionality was removed that allowed retrieving a specific operation per server index. This change breaks the functionality of using server_index, causing the incorrect server to be retrieved.
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/pull/15162
Suggest a fix
Revert the commit causing the regression
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull request #15162 and the Ruby server generation path related to server_index. Reproduce the issue with the provided OpenAPI declaration and configuration, then confirm that selecting a server index retrieves the corresponding operation and that the regression is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100