swagger
swagger-core
swagger | swagger-core | |
---|---|---|
5 | 5 | |
1,609 | 7,338 | |
0.9% | 0.1% | |
9.6 | 8.3 | |
5 days ago | 9 days ago | |
TypeScript | Java | |
MIT License | Apache License 2.0 |
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.
swagger-core
-
Auto OpenAPI Generation — The Network Doesn’t Lie!
Examples include Swagger-Core, SpringFox, NSwag / Swashbuckle, Swagger-express / HAPI-Swagger, Django-REST-Swagger / Flask-RESTplus, etc.
-
OpenAPI Specification: The Complete Guide
JAX-RS is a java implementation of the OpenAPI Specification. - GitHub - swagger-api/swagger-core
-
URL Shortener: Java & Spring complete tutorial
Now Swagger UI is configured and we can start documenting our API. Inside UrlController, above every endpoint, we can use @ApiOperation annotation to add description. Depending on your needs you can use some other annotations.
-
Using Swagger API
Here is an example from Swagger APIs GitHub:
-
Organize code by concepts, not layers
Im mostly in C# land nowadays, but this seems to be the java version. I’m not sure it is as deeply integrated, as I think Java has a few popular server frameworks.
What are some alternatives?
springfox - Automated JSON API documentation for API's built with Spring
springdoc-openapi - Library for OpenAPI 3 with spring-boot
drf-spectacular - Sane and flexible OpenAPI 3 schema generation for Django REST framework.
openapi4j - OpenAPI 3 parser, JSON schema and request validator.
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
Swashbuckle.AspNetCore - Swagger tools for documenting API's built on ASP.NET Core
nestjs-otel - OpenTelemetry (Tracing + Metrics) module for Nest framework (node.js) 🔭
utoipa - Simple, Fast, Code first and Compile time generated OpenAPI documentation for Rust
nest-cli - CLI tool for Nest applications 🍹
realworld - "The mother of all demo apps" — Exemplary fullstack Medium.com clone powered by React, Angular, Node, Django, and many more
swagger-maven-plugin - JAX-RS & SpringMVC supported maven build plugin, helps you generate Swagger JSON and API document in build phase.