OpenAPITools / OpenAPITools/openapi-generator
[REQ][CSharp] Should API endpoints accept an additional parameter for specifying custom HTTP headers?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
Looking at the endpoints generated from the api.mustache template, there doesn't seem to be a way of passing custom HTTP headers as part of a request. The plan is to modify the mustache template by adding an optional parameter for specifying custom headers when making an API call.
Additional context
Adding this functionality to the C# API template will bring it in line with other language client generators, e.g. the python-legacy one, which already has this feature.
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 api.mustache template used for generated C# endpoints and compare the existing custom-header support in the linked python-legacy change. Define the optional custom-headers parameter for API calls, then verify that generated C# clients can pass those headers without affecting calls that omit it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, openapi
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100