git404hub

what is nswag fr?

ricosuter/nswag — explained in plain English

Analysis updated 2026-06-24

7,329C#Audience · developerComplexity · 3/5Setup · moderate

tl;dr

A .NET toolset that reads your ASP.NET Core web API and automatically generates OpenAPI documentation and ready-to-use client code in C# or TypeScript, so you never write API client code by hand.

vibe map

mindmap
  root((repo))
    What it does
      API documentation
      Client generation
      .NET toolchain
    Output
      OpenAPI spec
      C# clients
      TypeScript clients
    Frameworks Supported
      ASP.NET Core
      Angular
      React
    Usage Options
      NSwag Studio
      Command line
      MSBuild

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Generate a TypeScript client for your React frontend from your ASP.NET Core API without writing any client code by hand

VIBE 2

Add an interactive API documentation browser to your .NET web app with a single middleware line so developers can explore endpoints in the browser

VIBE 3

Automate TypeScript and C# client regeneration as part of a CI/CD build pipeline using MSBuild targets so clients always match the API

what's the stack?

C#.NETASP.NET CoreTypeScriptNuGetMSBuild

how it stacks up fr

ricosuter/nswagneuecc/unirxmob-sakai/uieffect
Stars7,3297,3237,302
LanguageC#C#C#
Setup difficultymoderateeasymoderate
Complexity3/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 30min

Requires .NET SDK, CLI tool works cross-platform but NSwagStudio GUI is Windows-only.

in plain english

NSwag is a set of tools for .NET developers that automates two related tasks: describing how a web API works, and generating the code needed to call it from other applications. When you build a web API in .NET or ASP.NET Core (Microsoft's frameworks for building websites and services), NSwag can read your existing code and produce an OpenAPI (formerly called Swagger) specification. This is a standardized document that describes every endpoint your API offers, what inputs each one expects, and what it returns. The document acts as a machine-readable contract that other tools can consume. From that contract, NSwag generates ready-to-use client code in C# or TypeScript. Instead of writing by hand the code that calls your API from a website or another service, NSwag writes it for you. TypeScript clients are available for several popular frontend frameworks including Angular, AngularJS, React (via the Fetch template), and Aurelia. C# clients can be used in regular .NET apps.NET Core, and Xamarin for mobile apps. The toolchain runs several ways: through NSwagStudio, a Windows desktop application with a graphical interface, via a command line tool that works on Windows, Mac, and Linux, directly in C# code via NuGet packages, or as part of an automated build process through MSBuild targets. ASP.NET Core projects can add a middleware layer that serves the generated documentation page and an interactive browser UI alongside the running application, letting developers and consumers of the API explore available endpoints without reading code.

prompts (copy fr)

prompt 1
I have an ASP.NET Core Web API and I want NSwag to generate a TypeScript fetch client for my React frontend. Show me how to add the NSwag NuGet packages, configure the middleware, and run the CLI to output a TypeScript client file.
prompt 2
I want to add an interactive Swagger UI page to my running ASP.NET Core API using NSwag middleware. Show me the Program.cs setup code to serve both the OpenAPI spec and the browser UI.
prompt 3
I want to automate TypeScript client generation in my .NET build so the client file is always regenerated when the API changes. Show me how to configure an MSBuild target in my .csproj file to run NSwag as part of the build.

Frequently asked questions

what is nswag fr?

A .NET toolset that reads your ASP.NET Core web API and automatically generates OpenAPI documentation and ready-to-use client code in C# or TypeScript, so you never write API client code by hand.

What language is nswag written in?

Mainly C#. The stack also includes C#, .NET, ASP.NET Core.

How hard is nswag to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is nswag for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.