Skip to content

Commit e284595

Browse files
committed
Henry's proposal on nullable
1 parent 8a8d9bb commit e284595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

versions/3.0.4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2684,7 +2684,7 @@ Other than the JSON Schema subset fields, the following fields MAY be used for f
26842684

26852685
| Field Name | Type | Description |
26862686
| ----------------------------------------------- | :-----------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2687-
| <a name="schema-nullable"></a>nullable | `boolean` | A `true` value adds `null` to the allowed values in addition to values of the type specified by the `type` keyword, and only if `type` is explicitly defined within the same Schema Object. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of `null` as a value. A `false` value leaves the specified or default `type` unmodified. The default value is `false`. |
2687+
| <a name="schema-nullable"></a>nullable | `boolean` | This keyword only takes effect if `type` is explicitly defined within the same Schema Object. A `true` value indicates that both `null` values and values of the type specified by `type` are allowed. Other Schema Object constraints retain their defined behavior, and therefore may disallow the use of `null` as a value. A `false` value leaves the specified or default `type` unmodified. The default value is `false`. |
26882688
| <a name="schema-discriminator"></a>discriminator | [Discriminator Object](#discriminator-object) | Adds support for polymorphism. The discriminator is used to determine which of a set of schemas a payload is expected to satisfy. See [Composition and Inheritance](#composition-and-inheritance-polymorphism) for more details. |
26892689
| <a name="schema-read-only"></a>readOnly | `boolean` | Relevant only for Schema Object `properties` definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but SHOULD NOT be sent as part of the request. If the property is marked as `readOnly` being `true` and is in the `required` list, the `required` will take effect on the response only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. |
26902690
| <a name="schema-write-only"></a>writeOnly | `boolean` | Relevant only for Schema Object `properties` definitions. Declares the property as "write only". Therefore, it MAY be sent as part of a request but SHOULD NOT be sent as part of the response. If the property is marked as `writeOnly` being `true` and is in the `required` list, the `required` will take effect on the request only. A property MUST NOT be marked as both `readOnly` and `writeOnly` being `true`. Default value is `false`. |

0 commit comments

Comments
 (0)