fastify-swagger
axios
fastify-swagger | axios | |
---|---|---|
8 | 4 | |
854 | 202 | |
2.9% | 2.5% | |
7.7 | 9.4 | |
17 days ago | 2 days ago | |
JavaScript | TypeScript | |
MIT License | 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.
fastify-swagger
-
Craft OpenAPI Specs & Production-Ready SDKs with Fastify
With Speakeasy, you can create client SDKs based on an OpenAPI specification. Fastify ships with the @fastify/swagger plugin, which provides convenient shortcuts for generating good OpenAPI specifications. We'll start this tutorial by registering @fastify/swagger in a Fastify project to generate a spec.
-
Testing for Breaking Changes in Fastify APIs
First letβs get our current OpenAPI specification out of Fastify and onto the file system. If you have not added the https://github.com/fastify/fastify-swagger plugin first go do that. Then use this simple script I called generate-spec.ts to write your OpenAPI specification to the filesystem.
- Is there a FastAPI alternative for Node?
- Is NestJS good for startups?
-
Automatic swagger ui for nodejs/express? (Info in comments)
The fastify-swagger docs has an example https://github.com/fastify/fastify-swagger
-
Better Backend DX: JSON Schema + TypeScript + Swagger = β¨ Vol. 1
@fastify/swagger is a fastify plugin to serve a Swagger UI, using Swagger (OpenAPI v2) or OpenAPI v3 schemas automatically generated from your route schemas, or from an existing Swagger/OpenAPI schema.
-
How do you write your API documentation? Any self-hosted utilities you'd recommend?
On the Node.js framework side of things, Fastify has support for Swagger with the fastify-swagger plugin.
-
How do you unify TypeScript for both frontend and backend?
With this approach, backend can be any programming languages that support OpenAPI or Swagger. Personally, I use fastify-swagger; but I can also be things like Python's FastAPI or Golang's Gin/Buffalo/Native.
axios
-
NestJS tip: how to inject multiple versions of the same provider into one module (e.g.: many Axios instances)
For example, when using the HttpModule module from @nestjs/axios we can use the dynamic module HttpModule.register() to configure our Axios instance. That module exposes a HttpService that has such configuration. But what if we want to have many Axios instances, each one with its own config and import everything in one module?
-
Is NestJS good for startups?
e.g. there's no reason in one of these systems where you couldn't just use Axios (or fetch) on its own to make outside requests. But instead, for no good reason, Nest wants to wrap Axios for you in a way that allows you to only really grab a single instance at a time. Which is not how Axios is meant to be used. This makes it so that you can't use the baseURL config option which is one of the most important options when constructing a client that's meant to work with a particular service. You could use a named injector but at this point there's no reason to not just pass around an instance other than Nest seemingly having this alternate pointless way of doing things. So basically, yes, in this case Nest pushes you into a pattern but that pattern isn't just ugly... it's inherently limiting to you while being more verbose and decreasing readability.
-
NestJs: Intercept axios responses and throw built-in HTTP errors for the exception filter
NestJs HttpModule
- Axios shipped a buggy version and it broke many productions apps. Let this be a lesson to pin your dependencies!
What are some alternatives?
fastify-openapi-glue - A plugin for the Fastify webserver to autogenerate a Fastify configuration based on a OpenApi(v2/v3) specification.
Playwright - Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
widdershins - OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript π
fastify-jwt - JWT utils for Fastify
tsrpc - A TypeScript RPC framework, with runtime type checking and serialization, support both HTTP and WebSocket. It is very suitable for website / APP / games, and absolutely comfortable to full-stack TypeScript developers.
openapi-client-axios - JavaScript client library for consuming OpenAPI-enabled APIs with axios
swagger - OpenAPI (Swagger) module for Nest framework (node.js) :earth_americas:
tsoa - Build OpenAPI-compliant REST APIs using TypeScript and Node
nestjs-axios-interceptor - NestJs: Intercept axios responses and throw built-in HTTP errors for the exception filter
awesome-jsonschema - A curated list of awesome JSON Schema resources, tutorials, tools, and more.
http.cat - :cat: HTTP Cats API