@@ -1800,17 +1800,17 @@ requestBody:
1800
1800
schema:
1801
1801
type: object
1802
1802
properties:
1803
+ # default for a string without ` contentEncoding` is `text/plain`
1803
1804
id :
1804
- # default for primitives without a special format is text/plain
1805
1805
type : string
1806
1806
format : uuid
1807
- profileImage:
1808
- # default for string with binary format is ` application/octet-stream`
1809
- type : string
1810
- format : binary
1807
+
1808
+ # default for a schema without `type` is `application/octet-stream`
1809
+ profileImage : {}
1810
+
1811
+ # default for arrays is based on the type in the `items`
1812
+ # subschema, which is an object, so `application/json`
1811
1813
addresses :
1812
- # default for arrays is based on the type in the `items`
1813
- # subschema, which is an object, so `application/json`
1814
1814
type : array
1815
1815
items :
1816
1816
$ref : ' #/components/schemas/Address'
@@ -1828,31 +1828,27 @@ requestBody:
1828
1828
schema:
1829
1829
type: object
1830
1830
properties:
1831
+ # No Encoding Object, so use default ` text/plain`
1831
1832
id :
1832
- # default is ` text/plain`
1833
1833
type : string
1834
1834
format : uuid
1835
+
1836
+ # Encoding Object overrides the default `application/json`
1837
+ # for each item in the array with `application/xml; charset=utf-8`
1835
1838
addresses :
1836
- # default based on the `items` subschema would be
1837
- # `application/json`, but we want these address objects
1838
- # serialized as `application/xml` instead
1839
1839
description : addresses in XML format
1840
1840
type : array
1841
1841
items :
1842
1842
$ref : ' #/components/schemas/Address'
1843
- profileImage :
1844
- # default is application/octet-stream, but we can declare
1845
- # a more specific image type or types
1846
- type : string
1847
- format : binary
1843
+
1844
+ # Encoding Object accepts only PNG or JPEG, and also describes
1845
+ # a custom header for just this part in the multipart format
1846
+ profileImage : {}
1847
+
1848
1848
encoding :
1849
1849
addresses :
1850
- # require XML Content-Type in utf-8 encoding
1851
- # This is applied to each address part corresponding
1852
- # to each address in he array
1853
1850
contentType : application/xml; charset=utf-8
1854
1851
profileImage :
1855
- # only accept png or jpeg
1856
1852
contentType : image/png, image/jpeg
1857
1853
headers :
1858
1854
X-Rate-Limit-Limit :
0 commit comments