OpenAPITools / OpenAPITools/openapi-generator
[REQ] [GO] Allow disabling OAuth2 support in Go client generator
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
The Go client generator includes support for OAuth2 via a dependency on the golang.org/x/oauth2 module. That module introduces a large number of transitive dependencies.
Describe the solution you'd like
For clients that don't need OAuth2 support, it'd be nice if the generator supported excluding the golang.org/x/oauth2 module and associated code. This would be similar to the existing withAWSV4Signature toggle, but it could default to true for backwards-compatibility.
Describe alternatives you've considered
I've written a post-processing script that uses sed to delete the OAuth2 bits of code from the generated files. It "works", but it's not something I'd want to maintain in the long-term.
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 with the Go client generator and its existing withAWSV4Signature toggle, then trace where the golang.org/x/oauth2 dependency and OAuth2 support are included in generated clients. Define the new option so OAuth2 can remain enabled by default while allowing it and its associated code to be excluded, and verify generated clients with and without the option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100