DynamicApiClientGen 1.0.1

dotnet tool install --global DynamicApiClientGen --version 1.0.1
                    
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 DynamicApiClientGen --version 1.0.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DynamicApiClientGen&version=1.0.1
                    
nuke :add-package DynamicApiClientGen --version 1.0.1
                    

DynamicApiClientGen ๐Ÿ› 

Generate fully-typed C# API clients from Swagger/OpenAPI definitions โ€” fast, automatic, and CLI-friendly.


๐Ÿ“† Features

  • Parses Swagger/OpenAPI JSON
  • Generates strongly-typed C# API client classes
  • Supports HTTP methods: GET, POST, PUT, DELETE
  • Integrates with HttpClientFactory
  • Simple CLI usage (install once, use anywhere)
  • Usable as a .NET library in your own code
  • Cross-platform

๐Ÿš€ Installation

๐Ÿ“Œ CLI Tool (Global)

dotnet tool install --global DynamicApiClientGen

๐Ÿ“† Core Library (NuGet)

dotnet add package DynamicApiClientGen.Core

๐Ÿงช Usage

โœ… CLI Tool (Command-Line)

From a local Swagger JSON file
DynamicApiClientGen --input ./swagger.json --output ./GeneratedApiClient.cs
From a remote Swagger URL
DynamicApiClientGen --input https://api.example.com/swagger/v1/swagger.json --output ./Client.cs

โœ… Core Library (Programmatic Usage in C#)

using DynamicApiClientGen.Core;
using System.Text.Json;

var swaggerJson = File.ReadAllText("swagger.json");
var swaggerDoc = SwaggerParser.ParseSwaggerJson(swaggerJson);

var generatedCode = ApiClientGenerator.GenerateApiClient(swaggerDoc);
File.WriteAllText("GeneratedClient.cs", generatedCode);

๐Ÿ“„ License

This project is licensed under the MIT License. You are free to use, modify, distribute, and integrate it into personal or commercial projects.


๐ŸŒ Repository

GitHub: github.com/alikeb1998/DynamicApiClientGen


โœจ NuGet Packages

Project Package Name Installation Command
CLI Tool DynamicApiClientGen dotnet tool install --global DynamicApiClientGen
Core Library (C# usage) DynamicApiClientGen.Core dotnet add package DynamicApiClientGen.Core

๐Ÿ™Œ Contributing

Feel free to open issues or submit pull requests. Feedback and contributions are always welcome!

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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.0.1 87 7/28/2025
1.0.0 399 7/25/2025