Open tracebackerror opened 2 years ago
Hello!
To define a "list of possible values" for a parameter in swagger you must inform the list of values through the "choices" attribute in the model, for example:
post_model = reqparse.RequestParser()
post_model.add_argument(
'format',
required=True,
location="args",
type=str,
choices=["csv", "xlsx", "txt"],
help="Formato do arquivo."
)
In the swagger it will be displayed:
Ask a question Currently im trying to set and path parameters and want to enum in swagger api docs. But i'm not able to find any clear documentation for that.