Open lkjsavolainen opened 5 years ago
I fixed it in my repo. https://github.com/LzpTec/typescript-rest
i'm facing the same issue. @EiZei did you find a solution for this ? @tripodsgames is there any way to achieve this without actually making changes to the library ?
i'm facing the same issue. @EiZei did you find a solution for this ? @tripodsgames is there any way to achieve this without actually making changes to the library ?
These are the changes I made to correct this problem. https://github.com/LzpTec/typescript-rest/commit/ceee1a97b80f9186332ee6e3c959219452b80961
Hello,
My current use case is that I have a service that provides two separate APIs. However even though these APIs are using different express routers and path prefixes typescript-rest fails with a runtime error.
For example:
As long as the two controllers are using different paths everything works fine but if any of the controller level paths are the same like in this example the following error is thrown at runtime:
[ERROR] 10:25:21 Error: Duplicated declaration for path [/v1/], method [1]. Function.InternalServer.resolvePath (/Volumes/repositories/promotions-api/node_modules/typescript-rest/dist/server-container.js:539:19)
Since these APIs are separated at express level there should be a way to avoid this. I have looked through the documentation but didnt see anything related to this.