NSwag VS swagger-ui

Compare NSwag vs swagger-ui and see what are their differences.

NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript. (by RicoSuter)

swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. (by swagger-api)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
NSwag swagger-ui
39 131
6,468 25,476
- 1.0%
8.9 9.8
7 days ago 6 days ago
C# JavaScript
MIT License Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

NSwag

Posts with mentions or reviews of NSwag. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-07.
  • This week I released v2.1 of my text-templating library Weave that now uses Source Generators by default.
    6 projects | /r/dotnet | 7 Dec 2023
    I'm mostly using it for C# API client generation from backend code - sort of similar to what a tool like NSwag Studio will do. I think NTypewriter has more flexibility though, and having a live view with the VS plugin makes development quick.
  • OpenAPI v4 Proposal
    24 projects | news.ycombinator.com | 31 May 2023
    NSwag does a wonderful job of generating TypeScript clients from OpenAPI specs. Definitely give it a shot before killing your current setup.

    https://github.com/RicoSuter/NSwag (It sucks in any OpenAPI yml, not just ones from Swashbuckle/C#)

  • Looking for an alternative to NSwag
    2 projects | /r/dotnet | 18 May 2023
  • The Typescript ecosystem is exhausting
    3 projects | /r/typescript | 14 May 2023
    I use this https://github.com/RicoSuter/NSwag but it's designed for .Net backends to some extent. But you can use the client generation from the command line or manually with the standalone client app.
  • Code generation from Swagger specification file
    2 projects | /r/dotnet | 22 Apr 2023
  • Tool for generating example API requests and responses from OpenAPI
    4 projects | /r/api | 3 Apr 2023
    Here are three tools that you can use to generate example API requests and responses from OpenAPI specifications. These tools should work well even if your schemas are deeply nested: Nswag (Command Line and GUI): Nswag is a Swagger/OpenAPI toolchain for .NET, TypeScript, and other platforms. It supports code generation, client generation, and API documentation. You can use NswagStudio, which is a graphical interface, or you can use the command line tool called "NSwag.exe" for generating example API requests and responses. GitHub: https://github.com/RicoSuter/NJsonSchema NswagStudio: https://github.com/RicoSuter/NSwag/wiki/NSwagStudio Dredd (Command Line): Dredd is a language-agnostic command-line tool for validating API descriptions against backend implementations. It supports OpenAPI, Swagger, and API Blueprint formats. Dredd can generate example requests and responses and validate whether your API implementation conforms to the API description. GitHub: https://github.com/apiaryio/dredd Documentation: https://dredd.org/en/latest/ Stoplight Studio (GUI): Stoplight Studio is a modern API design and documentation platform that supports OpenAPI and JSON Schema. It allows you to create, edit, and validate OpenAPI specifications and provides a powerful visual interface for generating example API requests and responses. Website: https://stoplight.io/studio/ GitHub: https://github.com/stoplightio/studio These tools should provide you with the ability to generate example API requests and responses from your OpenAPI specifications and handle deeply nested schemas.
  • Help me to generate swagger json Net 6
    1 project | /r/dotnetcore | 25 Feb 2023
  • Web API generate of swagger json file
    1 project | /r/dotnet | 21 Feb 2023
    I’ve got an ASP.NET Core web API - I integrate NSwag (which I prefer to Swashbuckle - personal preference), run the app locally to generate the actual JSON file. See https://github.com/RicoSuter/NSwag Then I have a Bicep file that creates the API from the OpenAPI specification. Sorry - I don’t do Terraform (most of the Azure samples are of Bicep, but it should be easy to convert).
  • Open API Generators for Typescript / Node?
    1 project | /r/webdev | 21 Jan 2023
    I have actually found that, but I was hoping for something with more popularity. E.g. this one is for .NET: https://github.com/RicoSuter/NSwag ( you can also generate typescript clients). But I do not want to bring in the dependency to another language, if possible.
  • Best practices of create models for back-end commutation.
    3 projects | /r/Angular2 | 26 Oct 2022
    If your API exposes a Swagger definition, you can use NSwag (https://github.com/RicoSuter/NSwag) to generate the TypeScript API Client and Models for you. We found this eliminates errors due to TS and API DTO’s not matching

swagger-ui

Posts with mentions or reviews of swagger-ui. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-11.
  • Simplifying Angular Development with Swagger: A Step-by-Step Guide
    3 projects | dev.to | 11 Apr 2024
    Swagger is a fantastic open-source toolset that's perfect for developing and describing RESTful APIs. It offers you a user-friendly interface to understand a service's capabilities without needing to dig into the code. It even provides a way for you to interact directly with the API, which means you get to test its functionality.
  • Open API with Postman
    3 projects | dev.to | 22 Mar 2024
    The API had an OpenAPI endpoint built with Swagger where I could download a JSON specification file for the API.
  • Best Software Documentation Tools
    4 projects | dev.to | 5 Feb 2024
    Swagger is a widely used tool for documenting and testing APIs.
  • How to Automatically Consume RESTful APIs in Your Frontend
    13 projects | dev.to | 25 Jan 2024
    Swagger is an open-source software framework that implements the OpenAPI Specification—an API description format for REST APIs. The OpenAPI Specification defines a standard, language-agnostic interface to HTTP APIs, enabling both humans and computers to discover and understand the capabilities of the API.
  • Embracing API-First Development: Building the Future of Software
    2 projects | dev.to | 24 Jan 2024
    Mocking and Testing: Once the API design is complete, developers create mock APIs to simulate the behavior of the actual services. This early testing phase helps identify any issues or mismatches between design and implementation before substantial development efforts are invested. Tools like Postman or Swagger are invaluable for API testing and validation.
  • Craft OpenAPI Specs & Production-Ready SDKs with Fastify
    5 projects | dev.to | 9 Nov 2023
    import fp from "fastify-plugin"; import swagger from "@fastify/swagger"; export default fp(async (fastify) => { fastify.register(swagger, { openapi: { info: { tags: [ { name: "drinks", description: "Drink-related endpoints", externalDocs: { description: "Find out more", url: "http://swagger.io", }, }, ], }, }, }); });
  • Como deixar o Swagger com tema dark mode usando NestJS
    2 projects | dev.to | 5 Nov 2023
  • Munca in QA manual
    1 project | /r/programare | 11 Jul 2023
  • ChatGPT: how I used it to convert HTTP requests to OpenAPI document
    2 projects | dev.to | 10 Jul 2023
    A very requested feature for Sharkio was the auto-generation of OpenAPI documentation using the recorded HTTP requests - to create standardized documentation.
  • What do people with a degree in computer science do at work?
    2 projects | /r/compsci | 25 Jun 2023
    Automation QA is a lot of the same duties as manual QA, but instead of writing and executing the test plans manually, we create and update automated tests that can run those validations programmatically, for example by using Selenium to automatically fill out and submit forms for a web application, or using Postman and/or Swagger to generate an API conversation test.

What are some alternatives?

When comparing NSwag and swagger-ui you can also consider the following projects:

openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production

autorest - OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python

ReDoc - 📘 OpenAPI/Swagger-generated API Reference Documentation [Moved to: https://github.com/Redocly/redoc]

Refit - The automatic type-safe REST library for .NET Core, Xamarin and .NET. Heavily inspired by Square's Retrofit library, Refit turns your REST API into a live interface.

redoc - 📘 OpenAPI/Swagger-generated API Reference Documentation

Polly - Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner. From version 6.0.1, Polly targets .NET Standard 1.1 and 2.0+.

fiber-swagger - fiber middleware to automatically generate RESTful API documentation with Swagger 2.0.

protobuf-net.Grpc - GRPC bindings for protobuf-net and grpc-dotnet

prism - Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations.

Unchase.OpenAPI.Connectedservice - :scroll: Visual Studio extension to generate OpenAPI (Swagger) web service reference.

drf-spectacular - Sane and flexible OpenAPI 3 schema generation for Django REST framework.