mtennoe / swagger-typescript-codegen

A Swagger Codegenerator tailored for typescript.
Apache License 2.0
140 stars 52 forks source link

Types are missing JSDocs #90

Open scottc opened 4 years ago

scottc commented 4 years ago

The api methods have docs, but the types themselves do not.

Actual: Response types are missing JSDocs

export type User {
    id: number;
    username: string;
}

Expected: JSDocs containing the definition descriptions.

/** */
export type User {
    /** {integer} The user ID. */
    id: number;
    /** The user name. */
    username: string;
}

Spec: https://swagger.io/docs/specification/2-0/describing-responses/

definitions:
  User:
    type: object
    properties:
      id:
        type: integer
        description: The user ID.
      username:
        type: string
        description: The user name.
mtennoe commented 4 years ago

Yo! Yep, seems like we are missing this. Shouldnt be too hard to add either, so should be an easy win. Might also be interesting to make it togglable so consumers can disable comments if desired.