@concepta/nestjs-swagger-ui v4.0.0
Rockets NestJS Swagger UI
Expose your OpenApi spec on your API using the powerful Swagger UI interface.
Project
Overview
The Swagger UI module provides a simple implementation of the @nestjs/swagger module.
Using this module, you can register the Swagger UI just like a normal module to reduce the amount of boilerplate in your main.ts.
Installation
yarn add @concepta/nestjs-swagger-ui
Usage
app.module.ts
@Module({
imports: [
SwaggerUiModule.register({
settings: {
path: 'api',
basePath: '/v1',
},
}),
],
})
export class AppModule {}
main.ts
async function bootstrap() {
// create app
const app = await NestFactory.create(AppModule);
// get the swagger ui service
const swaggerUiService = app.get(SwaggerUiService);
// set it up
swaggerUiService.setup(app);
// start listening
await app.listen(3000);
}
bootstrap();
Configuration
All of the options in the official docs for NestJS OpenApi are supported.
To see how they are mapped to the registration options settings
property,
see the SwaggerUiSettingsInterface
10 months ago
10 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago