[REQ] Allow extensibility for C# clients
See original GitHub issueIs 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
HttpClient
so 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.
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Managed Extensibility Framework (MEF) - Microsoft Learn
The Managed Extensibility Framework or MEF is a library for creating lightweight, and extensible applications. It allows application ...
Read more >SAP CX Extensibility: summary of what's available as of ...
Following the blog post “SAP C/4HANA Extensibility 101: SAP Cloud Platform, Kyma, ... Furthermore, here is a summary of the required steps.
Read more >Extensibility - an overview | ScienceDirect Topics
This chapter discusses API extensibility, which means the ability of clients to modify the behavior of interface without requiring to evolve the API...
Read more >nFactor Extensibility | Authentication, authorization, and ...
The StoreFront SDK allows the logon page with an XML schema to use the <Requirement> tag and define elements on it. These elements...
Read more >Extensibility
There are several facilities in place that enable extensibility using Anonymous extensions. ... b. Add external client roles to the configuration. c.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I didn’t write the httpclient library, but I believe it is the same as the default restsharp, just patched to force it to use HttpClient. My generichost library is a complete rewrite at this point. The clients are added to the host in the ConfigureApi method. What you are showing here is only the user provided Action, it’s not all that happens. The clients are registered as singletons (will become transient once my PRs are merged).
Sure, see here the library option. https://openapi-generator.tech/docs/generators/csharp-netcore