Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Refit Support #128

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DemoCoreWeb.ClientApi/DemoCoreWeb.ClientApi.csproj
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Refit" Version="6.3.2" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

1,734 changes: 1,734 additions & 0 deletions DemoCoreWeb.ClientApi/WebApiClientRefit.cs

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion WebApiClientGenCore.Abstract/CodeGenParameters.cs
Original file line number Diff line number Diff line change
@@ -175,7 +175,14 @@ public class CodeGenOutputs : ModelGenOutputs
/// </summary>
public bool CancellationTokenEnabled { get; set; }

public JSPlugin[] Plugins { get; set; }

/// <summary>
/// Replce the Http Client with Refit RestApi Client
/// See https://github.com/reactiveui/refit
/// </summary>
public bool UseRefit { get; set; }

public JSPlugin[] Plugins { get; set; }
}

/// <summary>
1,340 changes: 710 additions & 630 deletions WebApiClientGenCore/ClientApiFunctionGen.cs

Large diffs are not rendered by default.

681 changes: 350 additions & 331 deletions WebApiClientGenCore/ControllersClientApiGen.cs

Large diffs are not rendered by default.