finds.dev← search

// the find

RicoSuter/NSwag

★ 7,345 · C# · MIT · updated Jun 2026

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

NSwag is an OpenAPI/Swagger toolchain for .NET that handles both directions: generating OpenAPI specs from ASP.NET Core controllers, and generating C# or TypeScript clients from those specs. It's the go-to option for .NET shops that want code generation without stitching together Swashbuckle and AutoRest separately. Maintained by a single primary author with broad community contributions.

The bidirectional generation (spec-from-code and code-from-spec) in one package is genuinely useful — you're not coordinating two separate tools with version skew. The NJsonSchema foundation means inheritance and complex type hierarchies are handled better than most alternatives. MSBuild integration and the nswag.json config file mean you can wire it into CI without a separate script. The snapshot-tested code generation means regressions in generated output are caught.

OpenAPI 3.1 support is incomplete — NSwag is rooted in 2.0 and 3.0, and the spec has moved on. The generated C# client code is verbose and opinionated; customizing it requires either wrestling with Liquid templates or forking the generators. NSwagStudio is Windows-only and increasingly looks like an afterthought given the CLI and MSBuild paths. Being a one-person-primary-author project with 1,300 forks means PRs pile up slowly and the issue backlog is long — if you hit an edge case in generation, expect to wait.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →