Skip to content

Commit 9adf222

Browse files
committed
Add null guidance for CDATA and text
The guidance is the same as for serializing `null` and other non-text data types to text in other text-based media types such as the form media types.
1 parent e7324a7 commit 9adf222

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/oas.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3152,6 +3152,7 @@ However, implementations SHOULD handle `null` values as follows:
31523152

31533153
* For elements, produce an empty element with an `xsi:nil="true"` attribute.
31543154
* For attributes, omit the attribute.
3155+
* For text and CDATA sections, see [Appendix B](#appendix-b-data-type-conversion) for a discussion of serializing non-text values to text
31553156

31563157
Note that for attributes, this makes either a `null` value or a missing property serialize to an omitted attribute.
31573158
As the Schema Object validates the in-memory representation, this allows handling the combination of `null` and a required property.

0 commit comments

Comments
 (0)