diff --git a/versions/3.0.md b/versions/3.0.md index 233868955c..db37f53e87 100644 --- a/versions/3.0.md +++ b/versions/3.0.md @@ -761,8 +761,8 @@ Field Name | Type | Description explode | `boolean` | When this is true, parameter values of type `array` or `object` generate separate parameters for each value of the array, or key-value-pair of the map. For other types of parameters this property has no effect. When [`style`](#parameterStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`. 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`. schema | [Schema Object](#schemaObject) | The schema defining the type used for the parameter. -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. -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. +examples | [[Example Object](#exampleObject)] | Examples of the content type. Each example in the Examples array SHOULD 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 SHALL _override_ the example provided by the schema. +example | [Example Object](#exampleObject) | Example of the content type. The example object SHOULD 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 SHALL _override_ the example provided by the the schema. For more complex scenarios a `content` object can be used to define the media-type and schema of the parameter. This option is mutually exclusive with the simple scenario @@ -1089,8 +1089,8 @@ Each content type object provides schema and examples for a the media type ident Field Name | Type | Description ---|:---:|--- schema | [Schema Object](#schemaObject) | The schema defining the type used for the request body. -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. -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. +examples | [Examples Array](#examplesArray) | Examples of the content type. Each example in the Examples array SHOULD 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 SHALL _override_ the example provided by the schema. +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 SHALL _override_ the the example provided by the schema. ##### Patterned Fields Field Pattern | Type | Description @@ -1642,21 +1642,15 @@ X-Rate-Limit-Reset: type: integer ``` -#### Examples Object - -Allows sharing examples for operation requests and responses. +#### Example Object -##### Patterned Fields -Field Pattern | Type | Description ----|:---:|--- -{[media type](#mediaTypes)} | Any | The name of the property MUST be one of the Operation `produces` values (either implicit or inherited). The value SHOULD be an example of what such a response would look like. +Allows sharing examples for operation requests and responses. This object can either be a freeform object, array or primitive value. To represent examples of media types that cannot naturally represented in the OpenAPI definition, a string value can be used to contain the example with escaping where necessary. -##### Examples Array Example +##### Example Example Example representation for application/json media type of a Pet data type: ```json -[ { "name": "Puma", "type": "Dog", @@ -1664,16 +1658,16 @@ Example representation for application/json media type of a Pet data type: "gender": "Female", "breed": "Mixed" } -] ``` ```yaml -- - name: Puma - type: Dog - color: Black - gender: Female - breed: Mixed + +name: Puma +type: Dog +color: Black +gender: Female +breed: Mixed + ``` #### Links Object