json-api
NSwag
Our great sponsors
json-api | NSwag | |
---|---|---|
59 | 39 | |
7,300 | 6,437 | |
0.5% | - | |
4.9 | 8.9 | |
6 days ago | 2 days ago | |
CSS | C# | |
Creative Commons Zero v1.0 Universal | MIT License |
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.
json-api
-
Hatchify: The Fastest Way to Build JSON: APIs
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
-
Show HN: Sunnybox – An Email API for Effortless IMAP Integration
-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?
https://github.com/json-api/json-api/issues/795
There is an atomic operations extension:
-
A View on Functional Software Architecture
JSON:API to format each message
-
How to (and how not to) design REST APIs
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
-
Building a Secure RESTful API Using NestJS and Prisma With Minimum Code
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
Does this have any relation to https://jsonapi.org/ ?
-
An Introduction to APIs
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.
-
How to Host a RESTful API on Vercel
Easy, isn't it? The automatically generated APIs provide resource-centric RESTful endpoints using JSON:API as the transportation format. Here're a few more advanced examples of using the API:
NSwag
-
This week I released v2.1 of my text-templating library Weave that now uses Source Generators by default.
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
I find it odd that you've struggled so much with generating API clients. I've generated C# and TypeScript (Angular's HttpClient and React Query) clients for my API and never had any issues with them. With that being said, I didn't use OpenAPI's Java-based code generators and rather used ones made by third-party developers such as NSwag[0] and openapi-codegen[1].
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
-
The Typescript ecosystem is exhausting
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
-
Tool for generating example API requests and responses from OpenAPI
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.
-
Best practices of create models for back-end commutation.
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
- In Visual Studio 2022 Is there a way to generate a function from an OpenApi yaml file
-
What class should I create to deserialize this?
There are Swagger v2/OpenAPI v3 specifications in the repository. Could you use NSwag or (if you have Visual Studio) the Connected Services tools? That'll make a client and all the necessary types for you.
What are some alternatives?
openapi-generator - OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
autorest - OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
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.
swagger-ui - Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
protobuf-net.Grpc - GRPC bindings for protobuf-net and grpc-dotnet
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+.
Unchase.OpenAPI.Connectedservice - :scroll: Visual Studio extension to generate OpenAPI (Swagger) web service reference.
Protobuf.NET - Protocol Buffers library for idiomatic .NET
orval - orval is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml or json formats. 🍺
dapr - Dapr is a portable, event-driven, runtime for building distributed applications across cloud and edge.
RestEase - Easy-to-use typesafe REST API client library for .NET Standard 1.1 and .NET Framework 4.5 and higher, which is simple and customisable. Inspired by Refit
WebApiClient - An open source project based on the HttpClient. You only need to define the c# interface and modify the related features to invoke the client library of the remote http interface asynchronously.