nest-swaggify
v0.1.0
Published
NestJS Swagger groups - Group-based Swagger documentation generator
Maintainers
Readme
nest-swaggify
NestJS Swagger extension — split one API spec into multiple group-scoped docs via decorators, with runtime switching and static JSON output.
📦 Installation
npm install nest-swaggify
# or
pnpm add nest-swaggify🚀 Quick Start
Tag endpoints with the groups they belong to:
import { SwaggerInclude } from "nest-swaggify";
@SwaggerInclude("public-api")
@Controller("users")
export class UsersController {
@Get()
findAll() {} // appears in the public-api group doc
}Swap SwaggerModule.setup for setupSwagger in main.ts:
import { setupSwagger } from "nest-swaggify";
setupSwagger(app, config, { path: "api-docs" });Pick the served group via an environment variable:
SWAGGER_GROUP=public-api npm start📖 Documentation
Full documentation, API reference, CLI usage, and examples are available on GitHub:
👉 github.com/noah4520/nest-swaggify
Bug reports and questions go to issues.
