Swagger中的cURL请求?

时间:2019-03-22 13:12:06

标签: curl swagger

我是Swagger的新手。我想问个问题。我在服务器上有一个带有处理照片的神经网络的码头工人!要将照片发送到Docker进行处理,我将字符串“ curl http://本地主机:5000 /预测-X POST -F” image=@1201.jpg”发送到我尝试将此命令与通过邮递员的照片,一切正常,但我想尝试通过Swagger做到这一点。可能是这样的???我写了一个下载Phtograph的表格,但无法发送命令(curl http:// localhost:5000 /预测-X POST -F“ image=@1201.jpg”)你能帮忙吗?

 version: 1.0.0
# host: api.example.com
# basePath: /v1
# schemes:
#   - http
# host: 192.168.0.1:5000
# basePath: /predikt
paths:
   /upload:
     post:
       responses:
        '200':
          description: OK
       summary: Uploads a file.
       consumes:
         - multipart/form-data
       parameters:
        - in: formData
          name: upfile
          type: file
          required: true
          description: The file to upload.
        - in: formData
          name: note
          type: string
          required: false
          description: Description of file contents.
       

0 个答案:

没有答案