You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: versions/3.0.md
+26-20Lines changed: 26 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -764,8 +764,13 @@ Field Name | Type | Description
764
764
<a name="parameterExplode"></a>explode | `boolean` | When this is true, parameter values of type `array` or `object` generate seperate parameters for each value of the array, or key-value-pair of the map. For other types of parameters this property has no effect. The default value is false.
765
765
<a name="parameterAllowReserved"></a>allowReserved | `boolean` | Determines whether the parameter value should allow reserved characters, as defined by [RFC3986](https://tools.ietf.org/html/rfc3986#section-2.2) `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.
766
766
<a name="parameterSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the parameter.
767
+
<a name="parameterExamples"></a>examples | [Examples Array](#examplesArray) | Examples of the content type. Each example in the Examples Array must be in the correct format as specified parameter encoding. The `examples` object is mutually exclusive to the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value will _override_ the example provided by the schema.
768
+
<a name="parameterExample"></a>example | [Example Object](#exampleObject) | Example of the content type. The example object _must_ be in the correct format as specified in the parameter encoding. The `example` object is mutually exclusive to the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value will _override_ the example provided by the the schema.
767
769
768
-
For more complex scenarios a `content` object can be used to define the media-type and schema of the parameter.
770
+
For more complex scenarios a `content` object can be used to define the media-type
771
+
and schema of the parameter. This option is mutually exclusive with the simple scenario
772
+
above. When `example` or `examples` are provided in conjunction with the `schema` object,
773
+
the example must follow the prescribed serialization strategy for the parameter.
769
774
770
775
Field Name | Type | Description
771
776
---|:---:|---
@@ -1062,8 +1067,8 @@ Each content type object provides schema and examples for a the media type ident
1062
1067
Field Name | Type | Description
1063
1068
---|:---:|---
1064
1069
<a name="contentTypeSchema"></a>schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body.
1065
-
<a name="contentTypeExamples"></a>examples | [Examples Array](#examplesArray) | Examples of the content type.
1066
-
<a name="contentTypeExample"></a>example | [Example Object](#exampleObject) | Example of the content type.
1070
+
<a name="contentTypeExamples"></a>examples | [Examples Array](#examplesArray) | Examples of the content type. Each example in the Examples Array must be in the correct format as specified in the _content_ type. The `examples` object is mutually exclusive to the `example` object. Furthermore, if referencing a `schema` which contains an example, the `examples` value will _override_ the example provided by the schema.
1071
+
<a name="contentTypeExample"></a>example | [Example Object](#exampleObject) | Example of the content type. The example object _should_ be in the correct format as specified in the _content_ type. The `example` object is mutually exclusive to the `examples` object. Furthermore, if referencing a `schema` which contains an example, the `example` value will _override_ the the example provided by the schema.
Anywhere an `example` may be given, allow a $ref object.
2081
-
This does mean that `example`, structurally, can be either a string primitive or an object, like `additionalProperties`.
2085
+
Anywhere an `example` may be given, a JSON Reference may be used, with the
2086
+
explicit restriction that examples having a JSON format with object named
2087
+
`$ref`are not allowed. This does mean that `example`, structurally, can be
2088
+
either a string primitive or an object, similar to `additionalProperties`.
2082
2089
2083
-
In locations where the field being provided an `example` is a scalar value _or_ has it's content-type definition determined by a higher-level construct (a response payload, for example, uses the `produces` attribute to select the correct message format), the plural `examples` shall be used, and the payload format be specified as a key to the example.
2084
-
2085
-
In all cases, the payload is expected to be compatible with the type schema for the value that it is accompanying.
2086
-
Tooling Specifications may choose to validate compatibility automatically, and reject the example value(s) if they are not compatible.
2090
+
In all cases, the payload is expected to be compatible with the type schema
2091
+
for the value that it is accompanying. Tooling implementations may choose to
2092
+
validate compatibility automatically, and reject the example value(s) if they
0 commit comments