-
Notifications
You must be signed in to change notification settings - Fork 45
/
body-formdata-urlencoded.json
148 lines (148 loc) · 4.09 KB
/
body-formdata-urlencoded.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
{
"swagger": "2.0",
"info": {
"title": "Body Forms Data URLEncoded",
"description": "Test Infrastructure for AutoRest Swagger BAT",
"version": "1.0.0"
},
"host": "localhost:3000",
"schemes": ["http"],
"paths": {
"/formsdataurlencoded/pet/add/{petId}": {
"post": {
"tags": ["formsdataurlencoded"],
"summary": "Updates a pet in the store with form data",
"description": "",
"operationId": "formdataurlencoded_updatePetWithForm",
"consumes": ["application/x-www-form-urlencoded"],
"produces": ["application/json"],
"parameters": [
{
"name": "petId",
"in": "path",
"description": "ID of pet that needs to be updated",
"required": true,
"type": "integer"
},
{
"$ref": "#/parameters/Pet_type"
},
{
"$ref": "#/parameters/Pet_food"
},
{
"$ref": "#/parameters/Pet_count"
},
{
"name": "name",
"in": "formData",
"description": "Updated name of the pet",
"required": false,
"type": "string"
},
{
"name": "status",
"in": "formData",
"description": "Updated status of the pet",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Pet updated."
},
"405": {
"description": "Invalid input"
}
}
}
},
"/formsdataurlencoded/partialConstantBody": {
"post": {
"description": "Test a partially constant formdata body. Pass in { grant_type: 'access_token', access_token: 'foo', service: 'bar' } to pass the test.",
"operationId": "formdataurlencoded_partialConstantBody",
"consumes": ["application/x-www-form-urlencoded"],
"parameters": [
{
"$ref": "#/parameters/Grant_type"
},
{
"$ref": "#/parameters/Service"
},
{
"$ref": "#/parameters/AccessToken"
}
],
"responses": {
"200": {
"description": "Pet updated."
}
}
}
}
},
"parameters": {
"Pet_type": {
"name": "pet_type",
"description": "Can take a value of dog, or cat, or fish",
"type": "string",
"in": "formData",
"required": true,
"enum": ["dog", "cat", "fish"],
"x-ms-parameter-location": "method",
"x-ms-enum": {
"name": "PetType",
"modelAsString": false
}
},
"Pet_food": {
"name": "pet_food",
"description": "Can take a value of meat, or fish, or plant",
"type": "string",
"in": "formData",
"required": true,
"enum": ["meat", "fish", "plant"],
"x-ms-parameter-location": "method",
"x-ms-enum": {
"name": "PetFood",
"modelAsString": true
}
},
"Pet_count": {
"name": "pet_age",
"description": "How many years is it old?",
"type": "integer",
"in": "formData",
"required": true,
"x-ms-parameter-location": "method"
},
"Grant_type": {
"name": "grant_type",
"description": "Constant part of a formdata body.",
"type": "string",
"in": "formData",
"required": true,
"enum": ["access_token"],
"x-ms-parameter-location": "method",
"x-ms-enum": { "modelAsString": false }
},
"Service": {
"name": "service",
"in": "formData",
"required": true,
"description": "Indicates the name of your Azure container registry.",
"type": "string",
"x-ms-parameter-location": "method"
},
"AccessToken": {
"name": "access_token",
"x-ms-client-name": "aadAccessToken",
"in": "formData",
"required": true,
"description": "AAD access token, mandatory when grant_type is access_token_refresh_token or access_token.",
"type": "string",
"x-ms-parameter-location": "method"
}
}
}