You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
Does x-swagger-router-controller support typescript? #486
Question same as in title. Can I point in . yaml controllers to a ts file and in operationId point to a function implemented in a 'ts' file? If so please tell me how to do it. More preceisly: Will swagger-node support typescript?
Typescript compiles to JavaScript. So it is no problem to use it.
Just change all *.js files to *.ts files and add some types or other typescript stuff . Compile the project and run it from the output folder.
Haven't tried to use classes though..
@FieryCod I had a look at swagger-tools now and looks quite handy in terms of a lot of boiler plate code one does not have to do. I do see they are busy splitting it up in 3 projects (Deprecating swagger-tools).
The maintainer of swagger-tools told me about month ago (June 2017) that in short time there will be the next release of swagger-tools so I do not think it gonna be deprecated in couple of years. But of course I am not 100% sure. You can ask maintainer when specifically the new release is likely to happen on apigee's swagger-tools gitter.
Activity
[-]Why the swagger does me resolve .ts files?[/-][+]Why the swagger does not resolve .ts files?[/+][-]Why the swagger does not resolve .ts files?[/-][+]Does x-swagger-router-controller support typescript?[/+]0v3rst33r commentedon Jul 10, 2017
@FieryCod Did you come right? I am also interested in this.
meisterlampe commentedon Jul 10, 2017
Typescript compiles to JavaScript. So it is no problem to use it.
Just change all *.js files to *.ts files and add some types or other typescript stuff . Compile the project and run it from the output folder.
Haven't tried to use classes though..
kwojcik-blockether commentedon Jul 10, 2017
meisterlampe Why compile? There is
ts-nodeso he can run.tsfiles viats-node.0v3rst33r We did not choose the
swagger-node, but swagger-toolsmeisterlampe commentedon Jul 11, 2017
@FieryCod Right, but ts-node also transpiles to JavaScript and uses normal node afterwards.
0v3rst33r commentedon Jul 11, 2017
@FieryCod I had a look at
swagger-toolsnow and looks quite handy in terms of a lot of boiler plate code one does not have to do. I do see they are busy splitting it up in 3 projects (Deprecating swagger-tools).kwojcik-blockether commentedon Jul 13, 2017
The maintainer of
swagger-toolstold me about month ago (June 2017) that in short time there will be the next release ofswagger-toolsso I do not think it gonna be deprecated in couple of years. But of course I am not 100% sure. You can ask maintainer when specifically the new release is likely to happen on apigee'sswagger-toolsgitter.