如何解决Swagger PHP multipart/form-data 与 json 数据
我正在尝试将我的新路由添加到我的 swagger 文档中,但我遇到了 swagger 在多部分/表单数据中显示 JSON 正文的问题。请求由两部分组成,首先是图像,其次是 json 结构。我没有收到任何错误,但显示器没有显示 json。如何获取 multipart/form-data 以显示具有 json 结构的多个属性?
@OA\RequestBody(
required=true,@OA\MediaType(
mediaType="multipart/form-data",@OA\Schema(
@OA\Property(
property="File",description="PDF or image supported",type="file",@OA\Items(type="string",format="binary")
),@OA\Property(
property="Data",description="Archive data used to locat and archive the request",type="application/json",@OA\Schema(
@OA\Property(
property="targetTable",description="Some dexcription here",type="string",example="Customer_ID"
),@OA\Property(
property="indexes",example={{
"name":"first_name","value":"Fred"
},{
"name":"last_name","value":"Flintstone"
},{
"name":"form","value":"PhotoID"
}}
)
)
)
),),
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。