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
+36-12Lines changed: 36 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -753,15 +753,15 @@ Field Name | Type | Description
753
753
<a name="parameterDescription"></a>description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](http://spec.commonmark.org/) can be used for rich text representation.
754
754
<a name="parameterRequired"></a>required | `boolean` | Determines whether this parameter is mandatory. If the parameter is [`in`](#parameterIn) "path", this property is **required** and its value MUST be `true`. Otherwise, the property MAY be included and its default value is `false`.
755
755
<a name="parameterDeprecated"></a> deprecated | `boolean` | Specifies that a parameter is deprecated and should be transitioned out of usage.
756
-
<a name="parameterAllowEmptyValue"/>allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows you to send a parameter with a name only or an empty value. Default value is `false`.
756
+
<a name="parameterAllowEmptyValue"/>allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If [`style`](# @parameterStyle) is used, if behavior is `n/a`, the value of `allowEmptyValue` SHALL be ignored.
757
757
758
758
The rules for serialization of the parameter are specified in one of two ways.
759
-
For simpler scenarios, a `Style` and `Schema` can be used to describe the structure and syntax of the parameter.
759
+
For simpler scenarios, a [`style`](#parameterStyle) and [`schema`](#parameterSchema) can be used to describe the structure and syntax of the parameter.
760
760
761
761
Field Name | Type | Description
762
762
---|:---:|---
763
-
<a name="parameterStyle"></a>style | `string` | Describes how the parameter value will be serialized depending on type of the parameter value.
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.
763
+
<a name="parameterStyle"></a>style | `string` | Describes how the parameter value will be serialized depending on type of the parameter value. Default values (based on value of `in`): for `query` - `form`; for `path` - `simple`; for `header` - `simple`; for `cookie` - `form`.
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. When [`style`](#parameterStyle) is `form`, the default value is `true`. For all other styles, 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
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.
@@ -772,6 +772,7 @@ and schema of the parameter. This option is mutually exclusive with the simple
772
772
above. When `example` or `examples` are provided in conjunction with the `schema` object,
773
773
the example must follow the prescribed serialization strategy for the parameter.
774
774
775
+
775
776
Field Name | Type | Description
776
777
---|:---:|---
777
778
<a name="parameterContent"></a>content | [Content Object](#contentObject) | The content of the request body.
@@ -782,8 +783,8 @@ In order to support common ways of serializing simple parameters, a set of `styl
782
783
----------- | ------ | -------- | --------
783
784
matrix | `primitive`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7)
784
785
label | `primitive`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5)
785
-
form | `primitive`, `array`, `object` | `query`| Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8)
786
-
commaDelimited | `array` | `query`, `path` | Comma seperated array values. This option replaces `collectionFormat` equal to `csv`.
786
+
form | `primitive`, `array`, `object` | `query`, `cookie` | Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8). This option replaces `collectionFormat` with a `csv` value.
787
+
simple | `array` | `path`, `header` | Simple style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.2).
787
788
spaceDelimited | `array` | `query` | Space seperated array values. This option replaces `collectionFormat` equal to `ssv`.
788
789
pipeDelimited | `array` | `query` | Pipe seperated array values. This option replaces `collectionFormat` equal to `pipes`.
789
790
deepObject | `object` | `query` | Provides a simple way of rendering nested objects using form parameters.
A free-form query parameter, allowing undefined parameters of a specific type:
908
+
```json
909
+
{
910
+
"in": "query",
911
+
"name": "freeForm",
912
+
"type": "object",
913
+
"additionalProperties": {
914
+
"type": "integer"
915
+
},
916
+
"style": "form"
917
+
}
918
+
```
919
+
920
+
```yaml
921
+
in: query
922
+
name: freeForm
923
+
type: object
924
+
additionalProperties:
925
+
type: integer
926
+
style: form
927
+
```
928
+
905
929
#### <a name="requestBodyObject"></a>Request Body Object
906
930
907
931
Describes a single request body.
@@ -1176,7 +1200,7 @@ requestBody:
1176
1200
1177
1201
Note that in the above example, the contents in the `requestBody` must be stringified per RFC1866 when being passed to the server. In addition, the `address` field complex object will be strigified as well.
1178
1202
1179
-
When passing complex objects in the `x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the `parameterContent` section as `deepObject`.
1203
+
When passing complex objects in the `x-www-form-urlencoded` content type, the default serialization strategy of such properties is described in the `parameterContent` section as `form`.
1180
1204
1181
1205
##### Special Considerations for `mutlipart` content
1182
1206
@@ -1239,10 +1263,10 @@ A single encoding definition applied to a single schema property
1239
1263
##### Fixed Fields
1240
1264
Field Name | Type | Description
1241
1265
---|:---:|---
1242
-
<a name="contentType"></a>contentType | `string` | **Required.** The content-type to use for encoding a specific property.
1243
-
<a name="headers"></a>Headers | `object` | A string map allowing additional information to be provided as headers, for example `Content-Disposition`. Note `Content-Type` is described separately and will be ignored from this section.
1244
-
<a name="style"></a>Style | `string` | The content-type to use for encoding a specific property. See (#parameterContent) for details on the `style` property
1245
-
<a name="explode"></a>explode | `boolean` | When this is true, property 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 properties this property has no effect. The default value is false.
1266
+
<a name="encodingContentType"></a>contentType | `string` | The content-type to use for encoding a specific property. Default value depends on the property type: for `string` with `format` being `binary` - `application/octet-stream`; for other primitive types - `plain/text`; for `object` - `application/json`; for `array` - the default is defined based on the inner type.
1267
+
<a name="encodingHeaders"></a>Headers | `object` | A string map allowing additional information to be provided as headers, for example `Content-Disposition`. Note `Content-Type` is described separately and will be ignored from this section.
1268
+
<a name="encodingStyle"></a>style | `string` | The content-type to use for encoding a specific property. See (#parameterContent) for details on the [`style`](#parameterStyle) property. The behavior follows the same values allowed for `query` parameters, including default values.
1269
+
<a name="encodingExplode"></a>explode | `boolean` | When this is true, property 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 properties this property has no effect. When [`style`](#encodingStyle) is `form`, the default value is `true`. For all other styles, the default value is `false`.
1246
1270
1247
1271
This object can be extended with [Specification Extensions](#specificationExtensions).
0 commit comments