apigee-127 / swagger-tools

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

swagger tools typescript Controller issue #621

Open Millertaker opened 4 years ago

Millertaker commented 4 years ago

Trying to replicate the example given here using typescript the swagger-tools is trying to read the *.d.ts compiled files giving this error.

Error: Cannot find module '/app/packages/app/dist/controllers/User.d'
app_1       | Require stack:
app_1       | - /app/node_modules/swagger-tools/middleware/swagger-router.js
app_1       | - /app/node_modules/swagger-tools/index.js
app_1       | - /app/packages/app/dist/server.js
app_1       |     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1030:15)
app_1       |     at Function.Module._load (internal/modules/cjs/loader.js:899:27)
app_1       |     at Module.require (internal/modules/cjs/loader.js:1090:19)
app_1       |     at require (internal/modules/cjs/helpers.js:75:18)
app_1       |     at /app/node_modules/swagger-tools/middleware/swagger-router.js:81:22
app_1       |     at arrayEach (/app/node_modules/swagger-tools/node_modules/lodash/lodash.js:516:11)
app_1       |     at Function.forEach (/app/node_modules/swagger-tools/node_modules/lodash/lodash.js:9368:14)
app_1       |     at /app/node_modules/swagger-tools/middleware/swagger-router.js:76:7
app_1       |     at arrayEach (/app/node_modules/swagger-tools/node_modules/lodash/lodash.js:516:11)
app_1       |     at Function.forEach (/app/node_modules/swagger-tools/node_modules/lodash/lodash.js:9368:14)