Matchup
Microsoft Kiota vs NSwag
A choice .NET teams often face: both are free and open source, and both write C# and TypeScript clients from an OpenAPI description. Kiota builds a fluent client on Microsoft's shared core libraries (the Microsoft.Kiota.Bundle package in .NET), with pluggable authentication providers and a default retry handler. NSwag writes client classes you call with your own HttpClient, and the same toolchain can produce the description from your ASP.NET Core controllers.
Verdict
Microsoft Kiota wins, 14 to 9, over NSwag.
Microsoft Kiota 14/18 NSwag 9/18
Microsoft Kiota takes language support, typing, auth handling and retries. Even on error handling and maintenance.
| Criterion | Microsoft Kiota | NSwag |
|---|---|---|
| Language supportEdge: Microsoft Kiota | Solid Its docs list C#, Go, Java, PHP, Python, Ruby and TypeScript. Check the language support page for each one's maturity. Check: Kiota overview | Partial Two client languages: C#, and TypeScript with templates for Fetch, Axios (preview), Angular, AngularJS, Aurelia and jQuery. Callers in any other language need another generator. Check: NSwag README |
| TypingEdge: Microsoft Kiota | Strong Its docs describe strongly typed clients with models generated from the JSON Schema in your description, and IDE autocomplete for every resource. Check: Kiota overview | Solid Typed C# DTOs and TypeScript classes or interfaces come from the schemas through NJsonSchema, which documents its handling of enums and inheritance. Check how oneOf comes through for your description. Check: NSwag README |
| Auth handlingEdge: Microsoft Kiota | Solid Auth plugs in through authentication providers on the request adapter; an authorization handler ships for some languages only. Check: Kiota middleware handlers | Partial Security schemes don't become client configuration. You add the Authorization header yourself: an injected HttpClient or the PrepareRequest hook in C#, a base class with transformOptions in TypeScript. Check: NSwag: TypeScript client generator |
| RetriesEdge: Microsoft Kiota | Strong A retry handler for 429 and 503 responses is on by default in the C#, Go, Java, TypeScript, PHP and Python HTTP libraries; not in Ruby. Check: Kiota middleware handlers | Partial No retry logic is generated. The C# client takes an injected HttpClient, so retries come from whatever handlers you configure on it; in TypeScript you wrap the calls yourself. Check: NSwag: C# client generator settings |
| Error handlingEven | Solid Error responses described in your API become error models the client can raise. Check how your language surfaces them. Check: Kiota overview | Solid Exception classes are generated by default and carry the status code, response body and headers; documented error responses with a schema come back as a typed result on the exception. Check: NSwag: C# client generator settings |
| MaintenanceEven | Solid Regenerate from the description; the generated code stays small because shared behaviour lives in versioned core libraries you also keep up to date. Check: Kiota overview | Solid One .nswag configuration file regenerates the clients from the CLI, an npm package or an MSBuild target, and the same toolchain can produce the description from your ASP.NET Core controllers. Check its releases page for recent activity. Check: NSwag: C# client generator |
The verdict, and when to ignore it
Microsoft Kiota wins, 14 to 9, over NSwag. Microsoft Kiota takes language support, typing, auth handling and retries. Even on error handling and maintenance.
Pick Microsoft Kiota when
Your clients need retries and pluggable auth without hand-written handlers, you call large APIs and want to generate only the paths you use, or callers also need Go, Java, PHP, Python or Ruby. Check Kiota's docs for each language's maturity.
Kiota on Microsoft LearnPick NSwag when
Your API is ASP.NET Core, you only need C# and TypeScript, and you want the description and both clients regenerated from one .nswag file in your build, with no Kiota core libraries to keep up to date.
NSwag on GitHubMore matchups
Hand-written SDK vs OpenAPI Generator
OpenAPI Generator wins, 10 to 8, narrowly, over Hand-written SDK.
OpenAPI Generator vs Microsoft Kiota
Microsoft Kiota wins, 17 to 13, narrowly, over OpenAPI Generator.
No SDK (raw HTTP) vs hand-written SDK
Hand-written SDK wins, 9 to 2, over No SDK (raw HTTP).
Hand-written SDK vs MCP server
Too close to call: Hand-written SDK 10, MCP server over your API 9.
Speakeasy vs OpenAPI Generator
Speakeasy wins, 15 to 10, over OpenAPI Generator.
Swagger Codegen vs OpenAPI Generator
OpenAPI Generator wins, 11 to 9, narrowly, over Swagger Codegen.
NSwag vs OpenAPI Generator
OpenAPI Generator wins, 11 to 9, narrowly, over NSwag.