diff --git a/backend/src/app-init.ts b/backend/src/app-init.ts index 6c1a90915..85f0c2c77 100644 --- a/backend/src/app-init.ts +++ b/backend/src/app-init.ts @@ -29,16 +29,16 @@ export async function setupApp( mediaConfig: MediaConfig, logger: ConsoleLoggerService, ): Promise { - setupPublicApiDocs(app); + await setupPublicApiDocs(app); logger.log( - `Serving OpenAPI docs for public api under '/apidoc'`, + `Serving OpenAPI docs for public API under '/apidoc/v2'`, 'AppBootstrap', ); if (process.env.NODE_ENV === 'development') { - setupPrivateApiDocs(app); + await setupPrivateApiDocs(app); logger.log( - `Serving OpenAPI docs for private api under '/private/apidoc'`, + `Serving OpenAPI docs for private API under '/apidoc/private'`, 'AppBootstrap', ); } diff --git a/backend/src/utils/swagger.ts b/backend/src/utils/swagger.ts index 16675183c..ea7bc94c3 100644 --- a/backend/src/utils/swagger.ts +++ b/backend/src/utils/swagger.ts @@ -23,7 +23,7 @@ export async function setupPublicApiDocs(app: INestApplication): Promise { const publicApi = SwaggerModule.createDocument(app, publicApiOptions, { include: [PublicApiModule], }); - SwaggerModule.setup('apidoc', app, publicApi); + SwaggerModule.setup('apidoc/v2', app, publicApi); } export async function setupPrivateApiDocs( @@ -38,5 +38,5 @@ export async function setupPrivateApiDocs( const privateApi = SwaggerModule.createDocument(app, privateApiOptions, { include: [PrivateApiModule], }); - SwaggerModule.setup('private/apidoc', app, privateApi); + SwaggerModule.setup('apidoc/private', app, privateApi); } diff --git a/dev-reverse-proxy/Caddyfile b/dev-reverse-proxy/Caddyfile index 0e97dfe4b..7771ff52f 100644 --- a/dev-reverse-proxy/Caddyfile +++ b/dev-reverse-proxy/Caddyfile @@ -14,4 +14,5 @@ reverse_proxy /realtime http://127.0.0.1:3000 reverse_proxy /api/* http://127.0.0.1:3000 reverse_proxy /public/* http://127.0.0.1:3000 reverse_proxy /uploads/* http://127.0.0.1:3000 +reverse_proxy /apidoc/* http://127.0.0.1:3000 reverse_proxy /* http://127.0.0.1:3001