I use a library that doesn't have types then I'm building backend with nestjs app using JS instead of TS and for swagger I do the same that I do in apps wrote in TS however it doesn't show the routes, only the title
const options = new DocumentBuilder()
.setTitle('Example api')
.setVersion('0.1.0')
.build();
const document = swaggerModule.createDocument(app, options);
SwaggerModule.setup('api/docs', app, document);
do I need to do something else with JS?
I have here the minimal repo https://github.com/dancespiele/nest-swagger-javascript-starter however in this case I get this error:
/home/spielrs/Proyectos/javascript-starter/node_modules/@nestjs/swagger/dist/swagger-scanner.js:49
const denormalizedArray = [...routes.values()].map((ctrl) => this.explorer.exploreController(ctrl, applicationConfig, modulePath, globalPrefix, operationIdFactory));
^
TypeError: Cannot read properties of undefined (reading 'values')
it looks like swagger cannot detect routes