Skip to content
Snippets Groups Projects

task/swagger

Merged Chiquita Ahsanunnisa requested to merge task/swagger into development
Compare and
4 files
+ 84
4
Preferences
Compare changes
Files
4
+ 11
0
@@ -3,6 +3,7 @@ import { AppModule } from "./app.module";
import * as cookieParser from "cookie-parser";
import { ValidationPipe } from "@nestjs/common";
import { ForbiddenExceptionFilter } from "./middlewares/forbidden-exception.filter";
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
async function bootstrap() {
const app = await NestFactory.create(AppModule);
@@ -16,6 +17,16 @@ async function bootstrap() {
credentials: true,
});
const options = new DocumentBuilder()
.setTitle("GraduIT S2 API")
.setDescription("GraduIT API Documentation for S2 services")
.setVersion("1.0")
.addTag("bimbingan")
.addCookieAuth(process.env.COOKIE_NAME)
.build();
const document = SwaggerModule.createDocument(app, options);
SwaggerModule.setup("api-docs", app, document);
await app.listen(3000);
}
bootstrap();