OpenAPITools / OpenAPITools/openapi-generator

[BUG] Description

Open
#21,093 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?
Description

samples/client/petstore/go/go-petstore/README.md references a var petstore.ContextAccessToken, but it doesn't exist in code.

openapi-generator version

master

Steps to reproduce

https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/go/go-petstore/configuration.go does not contain ContextAccessToken even though it does in the README

Related issues/PRs
Suggest a fix

In client.mustache, the code with ContextAccessToken is only inserted if hasHttpBearerMethods is true. I don't see hasHttpBearerMethods at all in README.mustache. Should it be added there? I can make a PR if so.

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

Compare samples/client/petstore/go/go-petstore/README.md with the generated configuration.go, then inspect modules/openapi-generator/src/main/resources/go/client.mustache and README.mustache. Trace how hasHttpBearerMethods affects the generated README and configuration, and verify that the documented ContextAccessToken usage matches the generated Go client.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.