Defining enum for array in Swagger 2.0

后端 未结 2 1113
野的像风
野的像风 2021-01-01 20:38
type\": \"array\",
\"items\": {
    \"type\": \"string\",
    \"enum\": [\"MALE\",\"FEMALE\",\"WORKER\"]
}

or

type\": \"array\",
\"         


        
2条回答
  •  长情又很酷
    2021-01-01 21:13

    The first case is correct and these days swagger-ui generates a multiple-choise select of the enum values.

提交回复
热议问题