typeconv icon indicating copy to clipboard operation
typeconv copied to clipboard

Default annotations are too verbose when converting from TypeScript

Open ermakovich opened this issue 1 year ago • 0 comments

When not using --strip-annotations flag it seems to generate default title for every property, which seems to be too verbose. I would probably expect only explicit annotations to be included in the output.

Given this typescript code:

export type Side = "left" | "right";

It generates by default the following YAML when converting to OpenApi:

Side:
  enum:
    - left
    - right
  title: Side
  type: string

So, here is title: Side property added, which seems to be redundant.

Btw, would be great to add some documentation regarding annotations, like which fields and what syntax is supported for TypeScript. Currently it's not very clear.

ermakovich avatar Jan 22 '25 19:01 ermakovich