Skip to content

Commit

Permalink
Add @handrews nullable clarification
Browse files Browse the repository at this point in the history
approved by @tedepstein just forgot to add it to OAI#1977.
  • Loading branch information
Phil Sturgeon committed Feb 3, 2020
1 parent 61f9d7e commit a2e8bcc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion versions/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2314,7 +2314,8 @@ In addition to the JSON Schema properties defined in the vocabularies defined in

Field Name | Type | Description
---|:---:|---
<a name="schemaNullable"></a>nullable | `boolean` | Allows sending a `null` value for the defined schema. Default value is `false`.<br><br>A `nullable` value of `true` allows `null` in addition to other specified `type` values only if `nullable` and `type` are both specified within the same schema object. The effect of `"nullable" : true` is limited to its expansion of the set of allowed types, within the scope of its containing schema. An `enum`, `const`, `allOf`, or other keyword can independently prohibit `null` values, effectively overriding `"nullable" : true`.<br><br>A `nullable` value of `false` leaves the specified or default `type` unmodified. It has no effect on the schema object.<br><br>**Deprecated:** The `type` property now allows "null" as a type, alone or within a type array. This is the standard way to allow null values in JSON Schema. Use of `nullable` is discouraged, and later versions of this specification may remove it.
<a name="schemaNullable"></a>nullable | `boolean` | A true value adds `"null"` to the allowed type(s) specified by the `type` keyword, 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 value(s) of `type` unmodified. The default value is `false`.
<br><br>**Deprecated:** The `type` property now allows `"null"` as a type, alone or within a type array. This is the standard way to allow `null` values in JSON Schema. Use of `nullable` is discouraged, and later versions of this specification may remove it.
<a name="schemaDiscriminator"></a>discriminator | [Discriminator Object](#discriminatorObject) | Adds support for polymorphism. The discriminator is an object name that is used to differentiate between other schemas which may satisfy the payload description. See [Composition and Inheritance](#schemaComposition) for more details.
<a name="schemaXml"></a>xml | [XML Object](#xmlObject) | This MAY be used only on properties schemas. It has no effect on root schemas. Adds additional metadata to describe the XML representation of this property.
<a name="schemaExternalDocs"></a>externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation for this schema.
Expand Down

0 comments on commit a2e8bcc

Please sign in to comment.