swagger - Swagger 编辑器不显示多部分表单请求参数
问题描述
还没有找到一个实际工作的例子。我有的:
"beacons/add/picture": {
"post": {
"tags": [
"Beacon"
],
"description": "Add Beacon Picture",
"operationId": "addBeaconPic",
"produces": [
"application/json"
],
"requestBody" : {
"required": true,
"content" : {
"multipart/form-data" : {
"schema" : {
"$ref": "#/definitions/AddBeaconPicture"
}
}
}
},
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/BaseResponse"
}
},
"400": {
"description": "unexpected error",
"schema": {
"$ref": "#/definitions/ErrorModel"
}
}
}
}
}
在文档中,参数看起来是空的,但是需要多个表单参数,例如 id、name 等。
解决方案
推荐阅读
- java - 用户输入和使用其他类的方法
- gcc - 使用 GNU gcc 链接器链接使用 ARMCLANG v6 编译的静态库
- javascript - 数组中的对象查询字符串?
- api - Facebook 广告导致 RingCentral “创建网络研讨会注册人”
- c# - 为什么在 DataTable 中找不到 DataRow
- javascript - Cookie 从 URL 栏中可见,但在浏览器开发人员工具的应用程序选项卡中不可见
- arrays - 在C中只打印一次数组中的所有元素?
- reactjs - 找不到模块:无法解析“E:\React Projects\Project 8\redux\node_modules\react-redux\es\connect”中的“redux”
- twitter-bootstrap - 全屏高度容器 Bootstrap
- javascript - 获取数组内对象的索引并在函数中使用它