Skip to content

Broken types for arrays of union types #49

Closed
@jabrandes

Description

@jabrandes

The latest release update (version 1.8.1) introduced array types using the typical brackets-suffixed notation (${content}[]). However, the generator seems to produce faulty type definitions when the array is to contain a union of types or a union of enum values. That problem has not occured with previous versions using the Array<T> notation. An easy fix respecting the intentions of release 1.8.1 may be to put the content type inside parentheses to which the brackets-suffix can be applied.

Screenshots of the problem

Original Swagger definition:
image

Generated code: 1.8.1 generated type to the left, pre-1.8.1 generated type to the right
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions