Skip to content

Commit 29656bb

Browse files
committed
Even MOAR changes
- clarified additionalProperties - clarified default - changed the definition of $ref
1 parent 4d788be commit 29656bb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

versions/3.0.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,11 +2293,12 @@ The following properties are taken from the JSON Schema definition but their def
22932293
- not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema.
22942294
- items - Value MUST be an object and not an array. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. `items` MUST be present if the `type` is `array`.
22952295
- properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced).
2296-
- additionalProperties - Value can be boolean or object. If object, definition MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced).
2297-
- $ref - A [Reference Object](#referenceObject).
2296+
- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema.
22982297
- description - [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
22992298
- format - See [Data Type Formats](#dataTypeFormat) for further details. While relying on JSON Schema's defined formats, the OAS offers a few additional predefined formats.
2300-
- default - Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object.
2299+
- default - The default value represents what would be assumed by the consumer of the input as the value of the schema if one is not provided. Unlike JSON Schema, the value MUST conform to the defined type for the Schema Object defined at the same level. For example, of `type` is `string`, then `default` can be `"foo"`` but cannot be `1`.
2300+
2301+
Alternatively, any time a Scheme Object can be used, a [Reference Object](#referenceObject) can be used in place. This allows referencing definitions in place of defining them inline. Effectively, it is the `$ref` property in JSON Schema but follows the same guidelines and restrictions as the Reference Object. For example, additional properties alongside a `$ref` SHALL be ignored.
23012302

23022303
Additional properties defined by the JSON Schema specification that are not mentioned here are strictly unsupported.
23032304

0 commit comments

Comments
 (0)