acacode / acacode/swagger-typescript-api

Object additionalProperties incorrect with anyOf

Abierto
#469 0 comentarios 1 reacción 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
4.1k
Forks
436
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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;
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.