tsoa: v3.0.2 pre-release: cannot generate routes or swagger doc any more
Sorting
-
I’m submitting a …
- bug report
- feature request
- support request
-
I confirm that I
- used the search to make sure that a similar issue hasn’t already been submit
Expected Behavior
Ability to generate routes and swagger documention.
Current Behavior
Routes cannot be generated. Either an error is thrown, or the generation freezes, or completes without errors but does not generate the routes. The same happens for swagger documentation generation.
Possible Solution
Steps to Reproduce
- run “tsoa routes -c tsoa.json” or “tsoa swagger -c tsoa.json”
Context (Environment)
Version of the library: tested with 3.0.0, 3.0.1 and 3.0.2 Version of NodeJS: tested with 12.13.0, 12.16.1 and 13.9.0 Version of OS: Ubuntu 18.04.4 LTS
- Confirm you were using yarn not npm: [ ]
Detailed Description
We are currently using tsoa for all our services and are successfully generating routes and API doc with version 2.5.13 at the moment. Upon testing the pre-release we found out, thatwe cannot generate the route and doc any more. Our services differ in size and typescript features we are using, but none of them is currently working. Two of the services throw an error:
-
routes: Generate routes error. TypeError: Cannot read property ‘forEach’ of undefined at /project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:209:42 at Array.forEach (<anonymous>) at RouteGenerator.buildModels (/project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:197:53) at RouteGenerator.buildContent (/project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:190:26) at RouteGenerator.<anonymous> (/project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:88:40) at step (/project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:43:23) at Object.next (/project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:24:53) at /project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:18:71 at new Promise (<anonymous>) at __awaiter (/project/node_modules/tsoa/dist/routeGeneration/routeGenerator.js:14:12)
-
swagger: Generate swagger error. TypeError: Cannot read property ‘filter’ of undefined at /project/node_modules/tsoa/dist/swagger/specGenerator3.js:148:57 at Array.map (<anonymous>) at SpecGenerator3.buildSchema (/project/node_modules/tsoa/dist/swagger/specGenerator3.js:145:53) at SpecGenerator3.buildComponents (/project/node_modules/tsoa/dist/swagger/specGenerator3.js:88:27) at SpecGenerator3.GetSpec (/project/node_modules/tsoa/dist/swagger/specGenerator3.js:50:30) at Object.<anonymous> (/project/node_modules/tsoa/dist/module/generate-swagger-spec.js:65:89) at step (/project/node_modules/tsoa/dist/module/generate-swagger-spec.js:32:23) at Object.next (/project/node_modules/tsoa/dist/module/generate-swagger-spec.js:13:53) at /project/node_modules/tsoa/dist/module/generate-swagger-spec.js:7:71 at new Promise (<anonymous>)
The other services either do not complete and do not show any error message, or do complete but do not generate anything. I do not have any additional logging for these cases, but I can provide a strace log if needed. I have tested this on a seperate machine, also with Ubuntu, and got the same results. Please let me know if you need any further information regarding our setup.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (2 by maintainers)
Anything with ‘<’ and ‘>’ should not be happening inside the refMap. I fixed a bug concerning that which is still unreleased, but I’ll keep an eye on this.
What’s pretty weird is that the alias shows up as ‘refObject’, should be ‘refAlias’. I’ll try to reproduce the issue but I may have to come back for more info.