# RicoSuter/NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.

Repository: https://github.com/RicoSuter/NSwag
Canonical: https://ross.abutalabs.com/products/nswag
Homepage: http://NSwag.org
Language: C#
License: MIT
License Family: permissive
Topics: nswag, swagger, openapi, codegen, dotnet, webapi, aspnet, aspnetcore, angular, aurelia, typescript, csharp
Last push: 2026-06-21T10:29:45+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 88, release rhythm 68, longevity 100
- inputs: {"age_days": 4018, "days_push": 73, "days_rel": 135, "gap_med": 35, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7358, forks 1357 (observed 2026-08-28T04:09:58.485507+00:00)

## What it is
NSwag is a Swagger/OpenAPI 2.0 and 3.0 toolchain for .NET, ASP.NET Core, and TypeScript, written in C#. It generates OpenAPI specifications from ASP.NET Web API controllers and generates C# and TypeScript client code from those specifications, combining Swashbuckle and AutoRest functionality in one tool.

## Use cases
- generate openapi spec from asp.net core controllers
- generate typescript client from swagger json
- generate c# api client from openapi 3.0 spec
- serve swagger ui in asp.net core app
- generate angular client code for rest api
- keep api clients in sync with webapi controllers

## When to choose
- you have ASP.NET (Core) Web API controllers and want OpenAPI docs and typed clients
- you need both spec generation and client code generation in one consistent toolchain
- you target TypeScript frameworks like Angular and want generated API clients
- you need better support for inheritance, enums, and reference handling than Swashbuckle alone

## When to avoid
- your API is not .NET-based and you only need client generation (AutoRest/openapi-generator may fit better)
- you only need minimal Swagger UI hosting without code generation
- you work outside the .NET/TypeScript ecosystem

## Facets
- artifact type: library
- maturity: active
- function: api-framework, api-documentation, middleware, http-server
- domain: apis, web-development, backend, developer-tools, documentation
- platform: dotnet, windows, cross-platform, cli
- tags: openapi, swagger, typescript-client, csharp-client, aspnetcore, code-generation, webapi, codegen, linux, macos

## Member repositories
- RicoSuter/NSwag (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:58.485507+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:38:25.290286+00:00, confidence not recorded.
  - readme: https://github.com/RicoSuter/NSwag (fetched 2026-08-28T04:09:58.485507+00:00, sha 877f107f6680)
- Data as of 2026-08-30T08:39:29.467469+00:00.
