swagger-api / swagger-api/swagger-codegen

[c#] csharp and csharp-dotnet2 needs new codegen

Open
#12,366 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

'csharp' and 'csharp-dotnet2' codegens are obsolete to say the least. While i do like very much what other parts of swagger-codegen-cli generate (as its default conventions and infrastructure seems very robust) generators needs updates / replacement to keep up with trending http-clients and language features.

  • Usage of M$-provided HttpClient is a safe pick for client implementation, no forced dependencies and optimal performance for pretty much most of stable .NET Core versions
  • System.Text.Json as serializer works pretty much fine on most cases when api works in a way that swagger can describe it.
  • usage of mono for building is not overly useful as dotnet is crossplatform without usage of mono right now
Swagger-codegen version

looking at 3.0.54

Suggest a fix/enhancement

Making some kind of clone for csharp-dotnet2 and refining code that generates clients and additional files would be nice.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the csharp and csharp-dotnet2 generators and the client and additional-file output they currently produce. Review how the generators build clients, serialize data, and depend on mono; done would require a defined replacement or refinement using HttpClient and System.Text.Json that builds across supported .NET Core versions.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.