OpenApiToRefit.Cli 1.1.2

dotnet tool install --global OpenApiToRefit.Cli --version 1.1.2                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local OpenApiToRefit.Cli --version 1.1.2                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=OpenApiToRefit.Cli&version=1.1.2                
nuke :add-package OpenApiToRefit.Cli --version 1.1.2                

OpenApi (swagger) to Refit

A simple tool to generate C# clients from OpenApi(swagger) format using Refit: The automatic type-safe REST library.

How to use

Open a powershell or cmd and run this command

dotnet tool install --global OpenApiToRefit.Cli --version 1.1.2

Then you can use cli like this:

OpenApiToRefit -i PetStoreProxyApi -n PetStore -u https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.yaml
Options:
  -i|--interface-name <CLASS_NAME>            The Interface name.
  -n|--namespace <NAMESPACE>                  The namespace for generated interface.
  -u|--openapi-url <OPEN_API_URL>             The url of the OpenApi.
  -o|--output-path <OUTPUT_PATH>              The output path of generated files.
  --nullable                                  Generate nullable reference types?
  --optional-parameters 					  Generate Optional Parameters?
  --base-interface							  Return IApiResponse instead of T
  -?|-h|--help                                Show help information.

You can also use below command to uninstall this library

dotnet tool uninstall --global OpenApiToRefit.Cli

How to build

  1. Open the sln in visual studio 2022
  2. Build the sln.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.1.2 114 9/16/2024
1.1.1 1,123 8/21/2023
1.1.0 1,229 5/14/2023
1.0.6 1,201 2/8/2023
1.0.5 1,124 2/8/2023
1.0.4 1,422 10/1/2022
1.0.3 1,267 6/18/2022
1.0.2 1,391 6/18/2022
1.0.1 1,281 6/18/2022
1.0.0 1,355 6/18/2022