apigee-127 / swagger-tools

A Node.js and browser module that provides tooling around Swagger.
MIT License
702 stars 371 forks source link

Support aysnc handler functions in ES2017 #568

Open danzGentrack opened 6 years ago

danzGentrack commented 6 years ago

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)

PierrickLozach commented 5 years ago

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