OpenAPITools / OpenAPITools/openapi-generator
[BUG][csharp] HttClient add in Host configuration can create conflit with other HttpClient
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Description
When generating a csharp client, the underlying HttpClient registration is using the name of the *Api class.
If the name is two generic and is used by another client, there is a conflict in the registration.
openapi-generator version
7.4, was present on previous versions
OpenAPI declaration file content or url
Not related to any config file or open api description
Command line used for generation
npx @openapitools/openapi-generator-cli generate -i http://localhost:5025/swagger/public-v1/swagger.json -c config.yaml
Steps to reproduce
Generate two client with the same name for grouping Api and you will have a conflict
Related issues/PRs
#18250
Suggest a fix/enhancement
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
Use the supplied openapi-generator command to generate two C# clients with the same name for grouping. Inspect the generated Host configuration and HttpClient registration, then verify that the clients no longer conflict when registered together.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100