Skip to content
Snippets Groups Projects
Commit d21c910e authored by Boyan Tsolov's avatar Boyan Tsolov
Browse files

test: validation pipe

parent 3b3a9239
No related branches found
No related tags found
No related merge requests found
Pipeline #66595 waiting for manual action with stages
in 28 minutes and 52 seconds
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This is only a minimal backend to get started. * This is only a minimal backend to get started.
*/ */
import { Logger } from "@nestjs/common"; import { Logger, ValidationPipe } from "@nestjs/common";
import { NestFactory } from "@nestjs/core"; import { NestFactory } from "@nestjs/core";
import { AppModule } from "./app/app.module"; import { AppModule } from "./app/app.module";
...@@ -49,6 +49,8 @@ async function bootstrap() { ...@@ -49,6 +49,8 @@ async function bootstrap() {
fs.writeFileSync("./gateway-swagger.json", JSON.stringify(document)); fs.writeFileSync("./gateway-swagger.json", JSON.stringify(document));
SwaggerModule.setup("api", app, document); SwaggerModule.setup("api", app, document);
app.useGlobalPipes(new ValidationPipe());
const port = gatewayConfig.httpPort || 3000; const port = gatewayConfig.httpPort || 3000;
await app.listen(port, gatewayConfig.host); await app.listen(port, gatewayConfig.host);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment