swagger-api / swagger-api/swagger-codegen

Add new C# Client Generator that uses Flurl to make the HttpClient calls?

Open
#10,043 3 comments 19 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

I want to add a new option for those generating C# Client code that uses Flurl as the HttpRequest mechanism. There is one here that uses what is called "RestSharp" (https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/csharp-dotnet2) and I was thinking all I need to to is clone the repo, add a new folder called "csharp-flurl" and start with and change over the RestSharp stuff to use Flurl in my folder?

I assume somewhere I need to let the system know there is a new client for C# called Flurl? I am not adding a whole new language, just a different type of client generation.

Is there a link on how to do this? I'm familiar with mustache so as long as I can download and get my C# client generation to show as a option and it executes my code I imagine I could get this working pretty quickly.

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 with the csharp-dotnet2 resource directory and compare its RestSharp templates with the desired Flurl-based client. Read the generator setup to find where C# client options are registered; done means a csharp-flurl option is available, generates the client, and executes the generated code.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.