OpenAPITools / OpenAPITools/openapi-generator

[BUG] Ruby client doesn't compile when Cookie Header Auth is present in OpenAPI schema

Open
#6,959 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

When cookie support for header auth is present in the OpenAPI schema v3, the Ruby client produced contains nothing after the : on the following line:

https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache#L173

On the other hand the Python client is generated correctly.

My understanding is that cookie header auth is not supported by the Ruby client, but the client should still compile.

openapi-generator version

4.3.1

Suggest a fix

In our current workflow we replace line 173 from the template with
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/configuration.mustache#L488

However, that is probably not exactly right because it gives the wrong impression to the user that cookie auth is supported, when in reality it is not.

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

Inspect modules/openapi-generator/src/main/resources/ruby-client/configuration.mustache around line 173 and compare it with the referenced Python configuration.mustache section. Generate a Ruby client from an OpenAPI v3 schema containing cookie header authentication, then verify that the configuration output compiles without implying unsupported cookie authentication.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.