grantila / grantila/typeconv

Default annotations are too verbose when converting from TypeScript

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
447
Forks
10
PR merge metrics
No merged PRs in 30d

Description

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:

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

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

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.