没有找到实际可行的示例。我所拥有的:
"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等。