OpenAPITools / OpenAPITools/openapi-generator
[REQ][csharp-netcore] Add Request Options as a parameter to the Wrapper API methods
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.
In the Typescript-axios generated client, all the methods take a RequestOptions object to enable callers a bit more control over resulting request. This is useful in several scenarios where there may need to be additional headers added only one place in the code.
Describe the solution you'd like
There is already the Request Options object that is being instantiated in each method. Add the RequestOptions as a method parameter and add a guard if statement to initialize the RequestOptions if it is the default instead of always initializing RequestOptions as a new instance.
Describe alternatives you've considered
Custom mustache file.
Additional context
Adding this to the default generated files will bring the c# net core API more inline with other language client generators.
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 generated C# .NET Core wrapper API methods described in the issue and compare them with the Typescript-axios client methods that already accept RequestOptions. Done means the wrapper methods accept RequestOptions and initialize a default only when needed, while preserving the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100