Closed hoangnq3004 closed 4 years ago
Hi @hoangnq3004, I'm happy you liked the tutorial.
Some guesses: Did you properly set up Decorators (e.g. using WarnerHooh/babel-plugin-parameter-decorator) ? I had some problems with that myself. Maybe there's something in your logs about that.
Could you provide a minimal reproduction repository? That'd make it a lot easier for me to help you.
Thanks for your reply!
Here is my repository https://github.com/hoangnq3004/tima
In case anybody finds this issue and wonders about the error:
The base route you pass to SwaggerModule.setup
(in the code above, that's docs
) doesn't take the global prefix into account that's set here (see below).
So you'll need to set it to api/docs
to make it work.
(I guess it's because the SwaggerModule hooks up to straight to express, without going through NestJS' routing mechanism first. That could be the reason why Swaggers routes don't show up in NestJS' route map, at least.)
Thank you very much!
Happy I could help. I've placed a link to this issue at the bottom of the blog post for future reference :)
Hi @Skn0tt !
Thanks for your tutorial!
I want to integrate @nestjs/swagger for auto documentation in my project but it not run
Here is my code
When I navigate to http://localhost:3000/api/docs/static/index.html, it's return 404 page.
How I can fix it? Please help!