Skip to content

arguments that can have value from a list of choices should not have collectionFormat in generated swagger docs #488

Open
@deepakunni3

Description

@deepakunni3

flask-restplus version: 0.11

https://github.com/noirbizarre/flask-restplus/blob/master/flask_restplus/reqparse.py#L287

When you add an argument that can have a value from a list of choices, the type of the argument is string but the generated swagger docs indicate that the argument is a collectionFormat: multi.

According to Swagger 2.0 specification (https://swagger.io/docs/specification/2-0/describing-parameters/) collectionFormat is only applicable for type: array.

I ran across this when trying to validate a generated swagger.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions