From d2652cc55137147a2ec0206f24d718e0378d5eb7 Mon Sep 17 00:00:00 2001 From: Ted Epstein Date: Tue, 17 Apr 2018 14:29:26 -0400 Subject: [PATCH 1/3] State explicitly: `additionalProperties : true` is the default Address #715 - State (explicitly) whether Open API schema object definitions are open or closed for extension. --- versions/3.0.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.0.2.md b/versions/3.0.2.md index 9b750af769..31df8b87cb 100644 --- a/versions/3.0.2.md +++ b/versions/3.0.2.md @@ -2301,7 +2301,7 @@ The following properties are taken from the JSON Schema definition but their def - not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. - 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`. - properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced). -- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. +- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true` or empty schema, allowing additional properties with any legal value. - description - [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. - 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. - 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, if `type` is `string`, then `default` can be `"foo"` but cannot be `1`. From 018e2f9cf049497477f8b61f2588d91a8d9b729c Mon Sep 17 00:00:00 2001 From: Ted Epstein Date: Thu, 19 Apr 2018 07:12:09 -0400 Subject: [PATCH 2/3] Small tweak: "an empty schema" Address #715 - State (explicitly) whether Open API schema object definitions are open or closed for extension. Add 'an' for readability. --- versions/3.0.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.0.2.md b/versions/3.0.2.md index 31df8b87cb..62bfc256bf 100644 --- a/versions/3.0.2.md +++ b/versions/3.0.2.md @@ -2301,7 +2301,7 @@ The following properties are taken from the JSON Schema definition but their def - not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. - 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`. - properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced). -- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true` or empty schema, allowing additional properties with any legal value. +- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true` or an empty schema, allowing additional properties with any legal value. - description - [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. - 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. - 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, if `type` is `string`, then `default` can be `"foo"` but cannot be `1`. From a7b1d7adafc8f0534893048dd97eff8061588234 Mon Sep 17 00:00:00 2001 From: Darrel Date: Mon, 23 Apr 2018 13:07:11 -0400 Subject: [PATCH 3/3] Update 3.0.2.md Updated suggested text to simplify --- versions/3.0.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/3.0.2.md b/versions/3.0.2.md index 62bfc256bf..edf9b72780 100644 --- a/versions/3.0.2.md +++ b/versions/3.0.2.md @@ -2301,7 +2301,7 @@ The following properties are taken from the JSON Schema definition but their def - not - Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. - 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`. - properties - Property definitions MUST be a [Schema Object](#schemaObject) and not a standard JSON Schema (inline or referenced). -- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true` or an empty schema, allowing additional properties with any legal value. +- additionalProperties - Value can be boolean or object. Inline or referenced schema MUST be of a [Schema Object](#schemaObject) and not a standard JSON Schema. Consistent with JSON Schema, `additionalProperties` defaults to `true`. - description - [CommonMark syntax](http://spec.commonmark.org/) MAY be used for rich text representation. - 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. - 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, if `type` is `string`, then `default` can be `"foo"` but cannot be `1`.