Closed mkalam-alami closed 4 years ago
The URL used for serving swagger.json should be constructed using url.resolve() instead of path.join(): https://github.com/mxarc/nestjs-redoc/blob/master/src/redoc-module.ts#L85
swagger.json
url.resolve()
path.join()
Because of path.join(), the swagger URL is transformed from /docs/swagger.json to \docs\swagger.json which makes the route fail on Windows (ReDoc then yields a "Something went wrong" error).
/docs/swagger.json
\docs\swagger.json
Hi, will fix today, thanks for reporting this issue
Fixed in latest version (1.2.2), should be available in npm registry
The URL used for serving
swagger.json
should be constructed usingurl.resolve()
instead ofpath.join()
: https://github.com/mxarc/nestjs-redoc/blob/master/src/redoc-module.ts#L85Because of
path.join()
, the swagger URL is transformed from/docs/swagger.json
to\docs\swagger.json
which makes the route fail on Windows (ReDoc then yields a "Something went wrong" error).