acacode / acacode/swagger-typescript-api
allOf fails on enums
- Lingua principale
- TypeScript
- Stelle
- 4.1k
- Fork
- 436
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The following code:
```yaml
components:
schemas:
Digit:
type: string
enum:
- zero
- one
- two
- three
- four
- five
- six
- seven
- eight
- nine
Even:
allOf:
- $ref: '#/components/schemas/Digit'
- type: string
enum:
- zero
- two
- four
- six
- eight
```
Compiles to:
```ts
export declare type Digit =
| 'zero'
| 'one'
| 'two'
| 'three'
| 'four'
| 'five'
| 'six'
| 'seven'
| 'eight'
| 'nine';
export declare type Even = (Digit & 'zero') | 'two' | 'four' | 'six' | 'eight';
```
`Even` should be:
```ts
export declare type Even = Digit & ('zero' | 'two' | 'four' | 'six' | 'eight');
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.