Incorrect TypeScript to OpenApi enums mapping when stripping annotations
- Dominant language
- TypeScript
- Stars
- 447
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
First of all, thanks for cool package! It seems to work great compared to other similar packages. However I found one issue.
When using `--strip-annotations` flag it changes the way how enums are converted.
Given this typescript code:
```ts
export type Side = "left" | "right";
```
By default it converts to this YAML, which seems to be correct:
```yaml
Side:
enum:
- left
- right
title: Side
type: string
```
But when `--strip-annotations` flag is used, it get's converted to wrong `anyOf` format:
```yaml
Side:
anyOf:
- enum:
- left
type: string
- enum:
- right
type: string
```
When using `--strip-annotations` it's expected to not change the way how enums are converted.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.