@@ -2186,18 +2186,18 @@ requestBody:
2186
2186
schema:
2187
2187
type: object
2188
2188
properties:
2189
+ # default for a string without ` contentEncoding` is `text/plain`
2189
2190
id :
2190
- # default for primitives without a special format is text/plain
2191
2191
type : string
2192
2192
format : uuid
2193
- profileImage:
2194
- # default for string with binary format is ` application/octet-stream`
2195
- type : string
2196
- format : binary
2193
+
2194
+ # default for a schema withhout `type` is `application/octet-stream`
2195
+ profileImage : {}
2196
+
2197
+ # for arrays, the Encoding Object applies to each item
2198
+ # individually based on that item's type, which in this
2199
+ # example is an object, so `application/json`
2197
2200
addresses :
2198
- # for arrays, the Encoding Object applies to each item
2199
- # individually based on that item's type, which in this
2200
- # example is an object, so `application/json`
2201
2201
type : array
2202
2202
items :
2203
2203
$ref : ' #/components/schemas/Address'
@@ -2215,31 +2215,27 @@ requestBody:
2215
2215
schema:
2216
2216
type: object
2217
2217
properties:
2218
+ # No Encoding Object, so use default ` text/plain`
2218
2219
id :
2219
- # default is ` text/plain`
2220
2220
type : string
2221
2221
format : uuid
2222
+
2223
+ # Encoding Object overrides the default `application/json`
2224
+ # for each item in the array with `application/xml; charset=utf-8`
2222
2225
addresses :
2223
- # default based on the `items` subschema would be
2224
- # `application/json`, but we want these address objects
2225
- # serialized as `application/xml` instead
2226
2226
description : addresses in XML format
2227
2227
type : array
2228
2228
items :
2229
2229
$ref : ' #/components/schemas/Address'
2230
- profileImage :
2231
- # default is application/octet-stream, but we can declare
2232
- # a more specific image type or types
2233
- type : string
2234
- format : binary
2230
+
2231
+ # Encoding Object accepts only PNG or JPEG, and also describes
2232
+ # a custom header for just this part in the multipart format
2233
+ profileImage : {}
2234
+
2235
2235
encoding :
2236
2236
addresses :
2237
- # require XML Content-Type in utf-8 encoding
2238
- # This is applied to each address part corresponding
2239
- # to each address in he array
2240
2237
contentType : application/xml; charset=utf-8
2241
2238
profileImage :
2242
- # only accept png or jpeg
2243
2239
contentType : image/png, image/jpeg
2244
2240
headers :
2245
2241
X-Rate-Limit-Limit :
0 commit comments