我正在使用swagger 2.0来定义我的API。我正在使用文档中描述的枚举
here
/my-endpoint:
x-swagger-router-controller: my-controller
get:
summary: my test endpoint
parameters:
- name: feeling
in: query
type: string
enum:
- happy
- sad
required: true
produces:
- application/json
responses:
200:
description: OK
我希望
400 bad request
feeling
查询参数也不是
happy
或
sad