acacode / acacode/swagger-typescript-api
Object additionalProperties incorrect with anyOf
未关闭
bug
- 主要语言
- TypeScript
- 星标
- 4.1k
- 派生
- 436
- PR 合并指标
- 30 天内没有已合并 PR
描述
I am trying to define a schema mapping to `Record` with the following schema snippet:
```ts
type: object
additionalDetails:
type: object
description: Additional properties
additionalProperties:
anyOf:
- type: string
- type: number
- type: array
items:
type: string
```
However swagger-typescript-api seems to be ignoring `anyOf` and is just generating a signature based on the last element in the array, rather than generating a union of the listed types.
```ts
additionalDetails?: Record;
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。