@@ -2186,18 +2186,18 @@ requestBody:
21862186 schema:
21872187 type: object
21882188 properties:
2189+ # default for a string without ` contentEncoding` is `text/plain`
21892190 id :
2190- # default for primitives without a special format is text/plain
21912191 type : string
21922192 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`
21972200 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`
22012201 type : array
22022202 items :
22032203 $ref : ' #/components/schemas/Address'
@@ -2215,31 +2215,27 @@ requestBody:
22152215 schema:
22162216 type: object
22172217 properties:
2218+ # No Encoding Object, so use default ` text/plain`
22182219 id :
2219- # default is ` text/plain`
22202220 type : string
22212221 format : uuid
2222+
2223+ # Encoding Object overrides the default `application/json`
2224+ # for each item in the array with `application/xml; charset=utf-8`
22222225 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
22262226 description : addresses in XML format
22272227 type : array
22282228 items :
22292229 $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+
22352235 encoding :
22362236 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
22402237 contentType : application/xml; charset=utf-8
22412238 profileImage :
2242- # only accept png or jpeg
22432239 contentType : image/png, image/jpeg
22442240 headers :
22452241 X-Rate-Limit-Limit :
0 commit comments