Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Does x-swagger-router-controller support typescript? #486

Open

Description

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?

Activity

  1. changed the title [-]Why the swagger does me resolve .ts files?[/-] [+]Why the swagger does not resolve .ts files?[/+] on Mar 29, 2017
  2. changed the title [-]Why the swagger does not resolve .ts files?[/-] [+]Does x-swagger-router-controller support typescript?[/+] on Mar 29, 2017
  3. 0v3rst33r commented on Jul 10, 2017

    @0v3rst33r

    @FieryCod Did you come right? I am also interested in this.

  4. meisterlampe commented on Jul 10, 2017

    @meisterlampe
    Contributor

    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..

  5. kwojcik-blockether commented on Jul 10, 2017

    @kwojcik-blockether
    Author

    meisterlampe Why compile? There is ts-node so he can run .ts files via ts-node.
    0v3rst33r We did not choose the swagger-node , but swagger-tools

  6. meisterlampe commented on Jul 11, 2017

    @meisterlampe
    Contributor

    @FieryCod Right, but ts-node also transpiles to JavaScript and uses normal node afterwards.

  7. 0v3rst33r commented on Jul 11, 2017

    @0v3rst33r

    @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).

  8. kwojcik-blockether commented on Jul 13, 2017

    @kwojcik-blockether
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions