Skip to content

Array of enums doesn't allow you to specify order or duplicate entries #1515

Open
@jacobweber

Description

@jacobweber

If I have an array of enums in a parameter, e.g.:

parameters": [
    {
        "name" : "test",
        "in" : "query",
        "type": "array",
        "collectionFormat": "csv",
        "items": {
            "type": "string",
            "enum": [ "a", "b", "c" ]
        }
    }
]

swagger-ui 2.1.1 will show a multi-select box. This is nice if the order of the array doesn't matter. But if you need to specify the order, it won't work.

Not sure what the best interface is here, unless you want to have multiple single-select menus with add/remove buttons.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions