swagger-tools
swagger-tools copied to clipboard
Support aysnc handler functions in ES2017
With the support of the new async and await feature in ES2017, I can write a function:
async function fetchData(url) {..}
swagger-tools doesn't support to use such an async function as a handler, due to this issue:
https://github.com/lodash/lodash/issues/3603
All async function would be skipped because _.isFunction used by swagger-router.js failed to recognize them.
(not a function, skipped)
I just had the same issue but it works after I upgraded from node 10 to 11 and swagger-tools:0.10.4