I replaced it by _.reduce() to merge the paths of '/todo/:id?' and '/todo/:id'.
To illustrate the current behavior, on http://swagger.balderdash.io/, the request DELETE /user/{id} is not documented.
I would have added some unit tests, but the current tests do not check the structure of the document so deeply yet. It should probably be done when improving the tests of the whole generated swagger document. Maybe I could work on it...
Fix a little bug that could hide some swagger paths.
For example, the retrieved REST blueprints routes looked like this
Using the following code, the first entry was overridden and the
delete
path did not appear in the swagger document.I replaced it by
_.reduce()
to merge the paths of'/todo/:id?'
and'/todo/:id'
.To illustrate the current behavior, on http://swagger.balderdash.io/, the request
DELETE /user/{id}
is not documented.I would have added some unit tests, but the current tests do not check the structure of the document so deeply yet. It should probably be done when improving the tests of the whole generated swagger document. Maybe I could work on it...