acacode / acacode/swagger-typescript-api
allOf fails on enums
- Ngôn ngữ chính
- TypeScript
- Star
- 4.1k
- Fork
- 436
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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');
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.