swagger
axios
swagger | axios | |
---|---|---|
5 | 4 | |
1,609 | 202 | |
0.9% | 2.5% | |
9.6 | 9.4 | |
4 days ago | 8 days ago | |
TypeScript | 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.
swagger
-
Can you tell me what's the difference of using @nestjs/swagger instead of class-validators for DTO validation? thank you
Yeah the API is very similar but they serve different purposes as you mention here. It looks like there's been some discussion about aligning them since other people have had a similar observation.
-
NestJS + esbuild workarounds
1. openapi is not defined. https://github.com/nestjs/swagger/issues/1450
-
decorators
The repository for every optional NestJS package that has decorators seems to consistently put them in /lib/decorators. For example, here are the NestJS Swagger decorators.
-
OpenAPI Specification: The Complete Guide
NestJS provides a dedicated module which allows generating OpenAPI (Swagger) - Github - nestjs/swagger
-
Announcing Ditsmod 2.0 beta (with RealWorld example)
Thanks to the system of extensions, Ditsmod applications are more expressive and with less code. For example, if you compare OpenAPI modules written in Ditsmod and NestJS, the Ditsmod module is 3.5 times smaller in the number of lines of code or the number of files.
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?
springfox - Automated JSON API documentation for API's built with Spring
Playwright - Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
drf-spectacular - Sane and flexible OpenAPI 3 schema generation for Django REST framework.
Nest - A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript 🚀
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
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.
nestjs-otel - OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
fastify-swagger - Swagger documentation generator for Fastify
nest-cli - CLI tool for Nest applications 🍹
nestjs-axios-interceptor - NestJs: Intercept axios responses and throw built-in HTTP errors for the exception filter
realworld - "The mother of all demo apps" — Exemplary fullstack Medium.com clone powered by React, Angular, Node, Django, and many more
http.cat - :cat: HTTP Cats API