Skip to content

Commit 11c94bc

Browse files
fixed pdf analyzer /docs redirect
1 parent 839c3bc commit 11c94bc

File tree

1 file changed

+4
-1
lines changed
  • apps/pdf-analyzer-service/src

1 file changed

+4
-1
lines changed

apps/pdf-analyzer-service/src/app.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ const app = express();
1010
app.use(express.json());
1111

1212
const openapiDoc = loadOpenApi();
13-
app.use('/docs', swaggerUi.serve, swaggerUi.setup(openapiDoc));
13+
app.get('/docs', (_req, res) => {
14+
res.send(swaggerUi.generateHTML(openapiDoc));
15+
});
16+
app.use('/docs', swaggerUi.serveFiles(openapiDoc));
1417
app.get('/', (_req, res) => res.redirect('/docs'));
1518

1619
registerRoutes(app);

0 commit comments

Comments
 (0)