forked from Azure/autorest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbody-formdata.json
116 lines (116 loc) · 2.71 KB
/
body-formdata.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"swagger": "2.0",
"info": {
"title": "AutoRest Swagger BAT Form Data Service",
"description": "Test Infrastructure for AutoRest Swagger BAT",
"version": "1.0.0"
},
"host": "localhost",
"schemes": [
"http"
],
"produces": [ "application/octet-stream" ],
"consumes": [ "application/json" ],
"paths": {
"/formdata/stream/uploadfile": {
"post": {
"operationId": "formdata_UploadFile",
"consumes": [
"multipart/form-data",
"application/octet-stream"
],
"produces": [
"application/octet-stream",
"application/json"
],
"description": "Upload file",
"tags": [
"Formdata"
],
"parameters": [
{
"name": "fileContent",
"description": "File to upload.",
"required": true,
"type": "file",
"in": "formData"
},
{
"name": "fileName",
"description": "File name to upload. Name has to be spelled exactly as written here.",
"required": true,
"in": "formData",
"type": "string"
}
],
"responses": {
"200": {
"description": "Serialized file stream",
"schema": {
"type": "file"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
},
"put": {
"operationId": "formdata_UploadFileViaBody",
"consumes": [
"application/octet-stream"
],
"produces": [
"application/octet-stream",
"application/json"
],
"description": "Upload file",
"tags": [
"Formdata"
],
"parameters": [
{
"name": "fileContent",
"description": "File to upload.",
"required": true,
"in": "body",
"schema": {
"type": "object",
"format": "file"
}
}
],
"responses": {
"200": {
"description": "Serialized file stream",
"schema": {
"type": "file"
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Error": {
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}