swagger-typescript-api
swagger-typescript-api copied to clipboard
Object additionalProperties incorrect with anyOf
I am trying to define a schema mapping to Record<string, string | number | string[] > with the following schema snippet:
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.
additionalDetails?: Record<string, string[]>;