You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using this library for all routes on Restify 4.x and 6.x without issues. There is however change in path resolver in restify 7.x and it is causing this issue:
Generated 'api.yml'
13:44:51.878Z FATAL rocket: Uncaught exception, aborting Node (err.code=ERR_ASSERTION)
AssertionError [ERR_ASSERTION]: The first character of a path should be `/` or `*`
at Router.on (...\node_modules\find-my-way\index.js:69:3)
at RouterRegistryRadix.add (...\node_modules\restify\lib\routerRegistryRadix.js:42:21)
at Router.mount (...\node_modules\restify\lib\router.js:212:20)
at Server.serverMethod [as get] (...\node_modules\restify\lib\server.js:1686:33)
at registerDocsRoute (...\node_modules\swagger-routes\src\routeRegister.js:36:7)
at Object.registerRoutes (...\node_modules\swagger-routes\src\routeRegister.js:12:3)
at addHandlers (...\node_modules\swagger-routes\src\index.js:19:17)
It happens ^^ when we call swaggerRoutes(server, {
We are using this library for all routes on Restify 4.x and 6.x without issues. There is however change in path resolver in restify 7.x and it is causing this issue:
It happens ^^ when we call
swaggerRoutes(server, {
To see what exactly is happening I logged data from https://github.com/mikestead/swagger-routes/blob/master/src/routeRegister.js#L34
And if I update it with this:
Then this is logged before error:
For new restify resolver, path cannot start with
\
.When I tried to just comment this line https://github.com/mikestead/swagger-routes/blob/master/src/routeRegister.js#L36 then everything else is working correctly and it loads all paths same as before.
The text was updated successfully, but these errors were encountered: