Getting Started
REST API Client Code Generator seamlessly integrates with your development workflow. Here's how to get started:

Add a new REST API Client from the Visual Studio context menu

Enter your OpenAPI specification URL and configure the generator settings
Supported Code Generators
NSwag
Version: v14.4.0
Generates clean, strongly-typed C# REST API clients using the NSwag.CodeGeneration.CSharp package. Features full async support, comprehensive error handling, and excellent integration with ASP.NET Core.
Dependencies: Newtonsoft.Json
OpenAPI Generator
Version: v7.14.0
Uses OpenAPI Generator to create comprehensive client libraries with extensive customization options. Supports multiple output formats and advanced configuration through additional properties.
Dependencies: RestSharp, JsonSubTypes, Polly, Newtonsoft.Json
Microsoft Kiota
Version: v1.27.0
Microsoft's modern API client generator with first-class support for Microsoft Graph and Azure APIs. Features strong typing, authentication patterns, and modern .NET practices.
Dependencies: Microsoft.Kiota.* packages, Azure.Identity
Refitter
Version: v1.6.0
Generates Refit interfaces for reactive REST clients. Perfect for applications using reactive patterns with comprehensive testing capabilities and clean interface design.
Dependencies: Refit
Swagger Codegen CLI
Version: v3.0.34
The original Swagger code generator with proven reliability and extensive language support. Ideal for legacy projects and established workflows.
Dependencies: RestSharp, JsonSubTypes
AutoRest
Version: v3.0.0-beta.20210504.2
Microsoft's AutoRest generator optimized for Azure services and general REST APIs. Includes advanced authentication, retry policies, and enterprise-grade reliability.
Dependencies: Microsoft.Rest.ClientRuntime, Newtonsoft.Json
Visual Studio Integration

Context menu options in Solution Explorer for quick code generation
Auto-Update Features
- Custom Tools Integration - Automatically regenerate client code when OpenAPI specification files change
- Namespace Configuration - Define custom namespaces for generated files
- Multiple File Support - Generate multiple files for complex APIs (OpenAPI Generator and Kiota)
- Configuration File Support - Use .nswag, .refitter, and kiota-lock.json configuration files
Configuration File Support

Generate code from NSwag Studio configuration files

Refitter configuration file integration

Microsoft Kiota configuration and code generation
Quick Start Guide
Get started with REST API Client Code Generator in just a few steps:
- Install the extension from the Visual Studio Marketplace for your IDE version
- Right-click your project in Solution Explorer and select "Add" → "REST API Client"
- Enter your OpenAPI specification URL (e.g., https://petstore.swagger.io/v2/swagger.json)
- Choose your preferred code generator (NSwag, OpenAPI Generator, Kiota, etc.)
- Configure the namespace and output filename
- Click Generate and start making API calls!
Cross-Platform Support
Visual Studio Code

VS Code integration with context menu support for JSON and YAML files
Visual Studio for Mac

Visual Studio for Mac integration
Command Line Tool
For automation and CI/CD scenarios, use our cross-platform command line tool:
# Install the global tool
dotnet tool install --global rapicgen
# Generate C# client using NSwag
rapicgen csharp nswag swagger.json MyNamespace ./MyClient.cs
# Generate TypeScript client
rapicgen typescript Angular swagger.json ./typescript-client
# Generate JMeter test plans
rapicgen jmeter swagger.json
Perfect for CI/CD Pipelines
- GitHub Actions - Automatically regenerate clients when APIs change
- Azure DevOps - Integrate with build pipelines
- Jenkins - Add to existing CI workflows
- Docker - Use in containerized build environments
Enterprise Ready
- Dependency Management - Automatically adds required NuGet packages
- Error Handling - Comprehensive error reporting and logging
- Configuration - Extensive customization options for each generator
- Analytics - Optional usage analytics to help improve the tool
- Support - Active community and regular updates