首页 文章

Swagger CSV Post

提问于
浏览
4

我们正在为我们的Laravel REST API实现开发Swagger文档 . 一些POST endpoints 将使用CSV作为参数内容类型 .

Is there a way in Swagger to have the "Try It Now" function work with a CSV POST file upload?

以下是我们正在进行的文件http://api.curvecompass.com/docs/#/

我们的Laravel POST功能可以正常使用CSV endpoints ,而不是Swagger文档 .

2 回答

  • 0

    swagger ui for open api 3.0还不支持文件上传 . 你可以在这里观看更新https://github.com/swagger-api/swagger-ui/issues/3641

  • 0

    你可以试试这个 .

    consumes:
        - multipart/form-data  # and/or application/x-www-form-urlencoded
      parameters:
        - name: file
          in: formData
          description: The uploaded file data
          required: true
          type: file
    

相关问题