OpenAPITools / OpenAPITools/openapi-generator
[REQ] Allow extensibility for C# clients
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.
We're having trouble using the generated .NET clients. It seems they are not open to extension like other client libraries. Specifically, all abstractions (Configuration, IApiAccessor, etc.) are generated within the client rather than factored out to a common library that extensions can rely on.
Describe the solution you'd like
- Publish an official library for base abstractions that generated client libraries depend on.
- Support a client constructor that accepts an
HttpClientso that the official client extensibility points can be leveraged.
Describe alternatives you've considered
From a first principles perspective, I don't think other solutions are possible without providing base abstractions. We will likely evaluate other generators or write our own.
Additional context
Providing extensibility would close #3581.
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 how generated .NET clients define Configuration and IApiAccessor, then compare their constructor surface with the linked HttpClient extensibility guidance. Review the discussion and related issue #3581 before defining scope; done means generated clients can rely on official shared abstractions and accept an HttpClient.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100