Skip to content

Commit

Permalink
🥅 Fix typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianpb committed Oct 23, 2024
1 parent 6d10b26 commit 2b3bfcb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions backend/src/controllers/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ options.swaggerDefinition.openapi = '3.0.0'
const specs: any = swaggerJsdoc(options);

// publish swagger json (optional)
router.get(`/bulk.json`, (_, res) => res.send(specs));
router.get(`/tsoa.json`, (_, res) => res.send(swaggerDocument));
router.get(`/bulk.json`, (_, res: any) => res.send(specs));
router.get(`/tsoa.json`, (_, res: any) => res.send(swaggerDocument));

specs.paths = {...specs.paths, ...swaggerDocument.paths}
specs.components = {...specs.components, ...swaggerDocument.components}
// specs.default = swaggerDocument.default;

// deafult swagger-example.json replaced by local swagger file
// this could also be done using a res.redirect('/path/to/swagger`)
router.get(`/svelte/swagger-example.json`, (_, res) => res.send(specs));
router.get(`/svelte/swagger-example.json`, (_, res: any) => res.send(specs));
router.use(`/svelte`, express.static(getCwd(), { 'index': ['index.html'] }));
router.use(`/`, swaggerUi.serve, swaggerUi.setup(specs));
2 changes: 1 addition & 1 deletion backend/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ app.use((
req: ExRequest,
res: ExResponse,
next: NextFunction
): ExResponse | void => {
): any => {
if (err instanceof ValidateError) {
log({
error: "Validation Failed",
Expand Down

0 comments on commit 2b3bfcb

Please sign in to comment.