Skip to content

Commit 6cefd77

Browse files
committed
Discuss null values and contentType
1 parent 285b300 commit 6cefd77

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

versions/3.0.4.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -1660,15 +1660,20 @@ Field Name | Type | Description
16601660

16611661
This object MAY be extended with [Specification Extensions](#specificationExtensions).
16621662

1663-
The default values for `contentType` are as follows:
1663+
The default values for `contentType` are as follows, where an _n/a_ in the `format` column means that the presence or value of `format` is irrelevant:
16641664

1665-
Property Type | Property Format | Default `contentType`
1665+
Property `type` | Property `format` | Default `contentType`
16661666
------------- | --------------- | ---------------------
16671667
`string` | `binary` | `application/octet-stream`
1668-
`string`, `number`, `integer`, or `boolean` | _n/a_ | `text/plain`
1668+
`string` | _none, or any except `binary`_ | `text/plain`
1669+
`number`, `integer`, or `boolean` | _n/a_ | `text/plain`
16691670
`object` | _n/a_ | `application/json`
16701671
`array` | _n/a_ | according to the `type` and `format` of the `items` schema
16711672

1673+
Determining how to handle `null` values if `nullable: true` is present depends on how `null` values are being serialized.
1674+
If `null` values are entirely omitted, then the `contentType` is irrelevant.
1675+
See [Appendix B](#dataTypeConversion) for a discussion of data type conversion options.
1676+
16721677
##### Fixed Fields for RFC6570-style Serialization
16731678

16741679
Field Name | Type | Description

0 commit comments

Comments
 (0)