swagger-tools icon indicating copy to clipboard operation
swagger-tools copied to clipboard

Support aysnc handler functions in ES2017

Open danzGentrack opened this issue 7 years ago • 1 comments

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)

danzGentrack avatar Apr 12 '18 08:04 danzGentrack

I just had the same issue but it works after I upgraded from node 10 to 11 and swagger-tools:0.10.4

PierrickLozach avatar Jun 11 '19 18:06 PierrickLozach