Skip to content

Commit 2d230fc

Browse files
committed
fix: add Missing types/ in the Docker image
1 parent 1fc125f commit 2d230fc

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ RUN pnpm install --frozen-lockfile
1111

1212
COPY tsconfig.json ./
1313
COPY index.ts app.ts ./
14+
COPY types types/
1415
COPY config config/
1516
COPY middlewares middlewares/
1617
COPY server server/

server/routes/api-docs-route.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ function getSpecCopy(): Record<string, unknown> {
1010
return JSON.parse(JSON.stringify(spec)) as Record<string, unknown>;
1111
}
1212

13+
const swaggerUiOptions = {
14+
explorer: true,
15+
deepLinking: true,
16+
persistAuthorization: true,
17+
docExpansion: "list",
18+
} as const;
19+
1320
export function mountApiDocs(app: ExpressApp): void {
1421
app.use(
1522
"/api-docs",
1623
swaggerUi.serve,
17-
swaggerUi.setup(getSpecCopy(), {
18-
explorer: true,
19-
deepLinking: true,
20-
persistAuthorization: true,
21-
docExpansion: "list",
22-
})
24+
swaggerUi.setup(getSpecCopy(), swaggerUiOptions as Record<string, unknown>)
2325
);
2426
app.get("/api-docs.json", (_req: unknown, res: ExpressResponse) => {
2527
res.json(getSpecCopy());

0 commit comments

Comments
 (0)