Hi,
When following the instructions for the Auto-generated REST API (link here), during the command conv-rest-api generate api -c car -f ./org1.car.config.json I get the error: "TypeError: Cannot read property 'getClassorThrow' of undefined". This is raised by reflectionUtils.js [152:41].
I am using a newer version of convector, where the file /org1.car.cconfig.json is now named as car.config.json, so I used that file.
I could notice that in class apiGenerator, the controllerName object was not retrieving the right data to variables plainName and controllersPattern. So I did a test and directly changed the file:
case 0:
plainName = controllerName.replace('Controller', '').toLowerCase();
controllersPattern = path_1.join(process.cwd(), ".") +
("/packages/**-cc/src/" + "car" + ".controller.ts");
return [4, reflectionUtils_1.ReflectionUtils.getClassMethods(controllersPattern,
"CarController")];//controllerName)];
I have basically inserted the CarController name, and then it worked.
Do you have any idea on why the correct name for the class is not being used in the application?
Hi,
When following the instructions for the Auto-generated REST API (link here), during the command conv-rest-api generate api -c car -f ./org1.car.config.json I get the error: "TypeError: Cannot read property 'getClassorThrow' of undefined". This is raised by reflectionUtils.js [152:41].
I am using a newer version of convector, where the file /org1.car.cconfig.json is now named as car.config.json, so I used that file.
I could notice that in class apiGenerator, the controllerName object was not retrieving the right data to variables plainName and controllersPattern. So I did a test and directly changed the file:
I have basically inserted the CarController name, and then it worked.
Do you have any idea on why the correct name for the class is not being used in the application?