Regarding swagger is not working in nodejs as per the swagger document.
Hi there,
I tried to setup swagger on nodejs as per the document par it is not working and present wrong data of swagger UI see the below attached screenshot. So just wanted to know how to setup swagger in nodejs so that all my apis display in one place. I tried lot of solutions on different different websites but same issue appeared. So kindly guide how to do that so that swagger is running properly.
Reference site that I tried below:
https://swagger.io/docs/open-source-tools/swagger-codegen/#:~:text=The%20Swagger%20Codegen%20is%20an,can%20be%20found%20in%20GitHub.
https://levelup.gitconnected.com/how-to-add-swagger-ui-to-existing-node-js-and-express-js-project-2c8bad9364ce
https://medium.com/bb-tutorials-and-thoughts/how-to-add-swagger-to-nodejs-rest-api-7a542cfdc5e1
https://plainenglish.io/blog/how-to-implement-and-use-swagger-in-nodejs-d0b95e765245
https://dev.to/kabartolo/how-to-document-an-express-api-with-swagger-ui-and-jsdoc-50do
https://itnext.io/setting-up-swagger-in-a-node-js-application-d3c4d7aa56d4
https://github.com/Surnet/swagger-jsdoc/blob/master/README.md
Looking forward to hearing from you. Thanks!
Swagger.json:
Server.js: