ojoanalogo / nestjs-redoc

📘 ReDoc frontend for you NestJS swagger API documentation
MIT License
146 stars 55 forks source link

Invalid spec URL on Windows #6

Closed mkalam-alami closed 4 years ago

mkalam-alami commented 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

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).

ojoanalogo commented 4 years ago

Hi, will fix today, thanks for reporting this issue

ojoanalogo commented 4 years ago

Fixed in latest version (1.2.2), should be available in npm registry