acacode / acacode/swagger-typescript-api

Object additionalProperties incorrect with anyOf

オープン
#469 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。