我有一个 Swagger YAML 函数,例如:
/acitem/image:
x-swagger-router-controller: image_send
get:
description: Returns 'image' to the caller
operationId: imageSend
parameters:
- name: name
in: query
description: The image to be sent
required: false
type: string
responses:
"200":
description: Success
schema:
# $ref: "#/definitions/ImageResponse"
type: string
default:
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
我的内容类型生成为:
produces:
- application/json
- text/plain
- text/html
- image/png
我的问题是 - 是否有一种优化的方法来编写图像响应,或者有没有办法排除我的图像响应验证???
提前致谢。