javascript - How to exclude response validation of swagger API for images? -
i have swagger yaml function such :
/acitem/image: x-swagger-router-controller: image_send get: description: returns 'image' caller operationid: imagesend parameters: - name: name in: query description: image sent required: false type: string responses: "200": description: success schema: # $ref: "#/definitions/imageresponse" type: string default: description: error schema: $ref: "#/definitions/errorresponse"
i have content type produces :
produces: - application/json - text/plain - text/html - image/png
but after have swagger validation error
my question - there optimized method write image response or there way exclude image response validation ???
thanks in advance.
you have error here:
responses: "200": description: success schema: # $ref: "#/definitions/imageresponse" type: string
you defined schema response structure using $ref, dont need 'type: string'
also, error related definition of imageresponse
Comments
Post a Comment