NSwag VS json-api

Compare NSwag vs json-api and see what are their differences.

NSwag

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

json-api

A specification for building JSON APIs (by json-api)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
NSwag json-api
39 59
6,468 7,314
- 0.5%
8.9 4.9
11 days ago 5 days ago
C# CSS
MIT License Creative Commons Zero v1.0 Universal
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

json-api

Posts with mentions or reviews of json-api. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-22.
  • Hatchify: The Fastest Way to Build JSON: APIs
    2 projects | dev.to | 22 Mar 2024
    In addition to saving you time on boilerplate, the API provided by Hatchify fully implements the JSON: API specification, which stipulates solid standards to define the peculiarities of CRUD REST APIs. Get back all the time spent bike-shedding how to implement standard API features like filtering, pagination, including related data, etc. JSON: API offers consistent practices for frontend and backend developers to agree on how resources are fetched and returned. Since Hatchify provides the core of your API for you, you can count on it’s standardized functionality to give your API a consistent start.
  • SQL as API
    7 projects | news.ycombinator.com | 25 Dec 2023
  • Show HN: Sunnybox – An Email API for Effortless IMAP Integration
    2 projects | news.ycombinator.com | 21 Dec 2023
    -JSON:API format responses (https://jsonapi.org) for better standardization.

    Built using Ruby on Rails, Sunnybox is designed to offer a powerful yet easy-to-use solution for developers managing email systems.

    I'd really appreciate your feedback on:

    - The API's user-friendliness and efficiency.

  • What if an SQL Statement Returned a Database?
    4 projects | news.ycombinator.com | 12 Dec 2023
    https://github.com/json-api/json-api/issues/795

    There is an atomic operations extension:

  • A View on Functional Software Architecture
    5 projects | dev.to | 10 Dec 2023
    JSON:API to format each message
  • Custom Fields: Give Your Customers the Fields They Need
    1 project | dev.to | 6 Dec 2023
    As we’re building a RESTful API that’s formatted by the JSON:API specification and store our data in a MySQL8 relational database, a few things were pretty straightforward – we need a new model and we’ll name it Custom Field (naming wasn’t an issue here 🥲).
  • How to (and how not to) design REST APIs
    3 projects | news.ycombinator.com | 1 Nov 2023
    I found json api spec[1] recently. This kind of is better standard for REST APIs. It is bit rough to handle client side but once you get the hang of it, it is breeze to use

    [1] https://jsonapi.org/

  • Building a Secure RESTful API Using NestJS and Prisma With Minimum Code
    5 projects | dev.to | 6 Sep 2023
    That's it! Now we have a complete set of RESTful CRUD APIs at "/api/zen" that conforms to the JSON:API specification, and the access policies fully protect the APIs. The API provides rich filtering and relation-fetching capabilities. The following are some examples; you can find more details here.
  • JSON Schema Store
    5 projects | news.ycombinator.com | 20 Aug 2023
    Does this have any relation to https://jsonapi.org/ ?
  • An Introduction to APIs
    2 projects | news.ycombinator.com | 30 Jul 2023
    Basic REST and JSON RPC are very simple to start with, but have common problems when application gets bigger. How do you represent relations, pagination, filtering etc? My go-to specification for structuring JSON documents is https://jsonapi.org/ It covers most basic needs of a standard API.

What are some alternatives?

When comparing NSwag and json-api 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)

api-guidelines - Microsoft REST API Guidelines

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

laravel-json-api - JSON API (jsonapi.org) package for Laravel applications.

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.

apollo - 🚀 Apollo/GraphQL integration for VueJS

swagger-ui - Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

grpcurl - Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers

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+.

grpc-swift - The Swift language implementation of gRPC.

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

postman-app-support - Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.