Skip to content

Commit

Permalink
🔥 Remove openapi doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Xen0Xys committed Oct 26, 2024
1 parent cbc80a7 commit 681cd82
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {SwaggerTheme, SwaggerThemeNameEnum} from "swagger-themes";
import {LoggerMiddleware} from "./common/middlewares/logger.middleware";
import {Logger} from "@nestjs/common";
import {CustomValidationPipe} from "./common/pipes/custom-validation.pipe";
import {AsyncApiDocumentBuilder, AsyncApiModule} from "nestjs-asyncapi";

dotenv.config();

Expand Down Expand Up @@ -114,19 +113,19 @@ async function loadServer(server: NestFastifyApplication<RawServerDefault>, serv
});

// AsyncAPI
const asyncApiOptions = new AsyncApiDocumentBuilder()
.setTitle("OWR API")
.setDescription("Documentation for the OWR API")
.setVersion(process.env.npm_package_version)
.setDefaultContentType("application/json")
.addBearerAuth()
.addServer("owr-api", {
url: "http://localhost:4000",
protocol: "socket.io",
})
.build();
const asyncapiDocument = AsyncApiModule.createDocument(server, asyncApiOptions);
await AsyncApiModule.setup("async-api", server, asyncapiDocument);
// const asyncApiOptions = new AsyncApiDocumentBuilder()
// .setTitle("OWR API")
// .setDescription("Documentation for the OWR API")
// .setVersion(process.env.npm_package_version)
// .setDefaultContentType("application/json")
// .addBearerAuth()
// .addServer("owr-api", {
// url: "http://localhost:4000",
// protocol: "socket.io",
// })
// .build();
// const asyncapiDocument = AsyncApiModule.createDocument(server, asyncApiOptions);
// await AsyncApiModule.setup("async-api", server, asyncapiDocument);

server.useGlobalPipes(new CustomValidationPipe());
}
Expand Down

0 comments on commit 681cd82

Please sign in to comment.