-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to get Server.swagger(...) to expose /api-docs endpoint #18
Comments
We're running into a similar issue.
Looking at the debug output, it appears to me as though the route is not registering in the same way as the API routes. Compare
|
@pdusen , are you running windows? We ran into an issue with Path.join here: thiagobustamante/typescript-rest-swagger#3, where the path library was inserting '\' instead of '/' when running on Windows. |
@tamethecomplex I am running Windows, and I independently reached a similar conclusion. |
Locally, I was able to resolve my problem by changing the implementation of
|
Just confirmed the same myself. |
Just opened a PR with this change: #19 |
Thanks. I already merged the code. |
Fixed in version 1.0.3 |
I was able to get swaggerGen to work, as well as normal routes using the @path decorator. However, I'm not able to expose the swagger endpoint using the example in the readme. Wondering if you could tell me what I'm doing wrong? Here is my server setup:
GET to http://localhost:5674/api-docs results in ERR_CONNECTION_REFUSED
GET to http://localhost:3000/api-docs (just in case the route was exposed on the same port as the other routes) results in a status 404
The text was updated successfully, but these errors were encountered: