swagger-express-middleware
swagger-express-middleware copied to clipboard
fix: some v3 branch fixes
@JamesMessinger
Hi!
I was testing out the v3 branch as a dependency in my repo https://github.com/mustafar/parrot/ and ran into some bugs that I'm fixing here to the best of my understanding
- I noticed that
next()
was not being invoked in somevalidate-request
middleware; this was causing the middleware chain to stall. - I also saw that the
isOpenApiRequest
predicate was not guaranteed to be a bool. -
basePath
was being calculated in thesetApi
metadata middleware, but was not being set incontext.api
Let me know if there's anything else I need to do to get this accepted and merged. Thanks!
Pull Request Test Coverage Report for Build 289
- 10 of 40 (25.0%) changed or added relevant lines in 4 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage decreased (-0.04%) to 41.122%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
lib/middleware/validate-request/validate-request-body.js | 2 | 4 | 50.0% |
lib/middleware/validate-request/validate-content-length.js | 3 | 11 | 27.27% |
lib/middleware/validate-request/validate-params.js | 4 | 24 | 16.67% |
<!-- | Total: | 10 | 40 |
Totals | |
---|---|
Change from base Build 284: | -0.04% |
Covered Lines: | 784 |
Relevant Lines: | 1717 |