Skip to content

Commit 65e7d0b

Browse files
committed
Updates based on review
1 parent c815866 commit 65e7d0b

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

versions/3.0.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,8 @@ Field Name | Type | Description
762762
<a name="parameterType"></a>type | `string` | **Required.** The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of `"string"`, `"number"`, `"integer"`, `"boolean"`, `"array"` or `"object"`.
763763
<a name="parameterFormat"></a>format | `string` | The extending format for the previously mentioned [`type`](#parameterType). See [Data Type Formats](#dataTypeFormat) for further details.
764764
<a name="parameterStyle"></a>style | `string` | Describes how the parameter value will be serialized depending on the specified [`type`](#parameterType).
765-
<a name="parameterAllowUnreserved"></a>allowReserved | `boolean` | Determines whether the parameter value should allow reserved characters `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. This property only applies to parameters with an `in` value of `query`. The default value is `false`.
766-
<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.
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+
<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.
767767
<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`.
768768
<a name="parameterItems"></a>items | [Items Object](#itemsObject) | **Required if [`type`](#parameterType) is "array".** Describes the type of items in the array.
769769
<a name="parameterDefault"></a>default | * | Declares the value of the parameter that the server will use if none is provided, for example a "count" to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: "default" has no meaning for required parameters.) See http://json-schema.org/latest/json-schema-validation.html#anchor101. Unlike JSON Schema this value MUST conform to the defined [`type`](#parameterType) for this parameter.
@@ -787,33 +787,34 @@ In order to support alternate ways of serializing parameters, a set of `style` v
787787
matrix | `string`, `array`, `object` | `path` | Path-style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.7)
788788
label | `string`, `array`, `object` | `path` | Label style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.5)
789789
form | `string`, `array`, `object` | `query`| Form style parameters defined by [RFC6570](https://tools.ietf.org/html/rfc6570#section-3.2.8)
790-
comma-delimited | `array` | `query`, `path` | Comma separated array values. This option replaces `collectionFormat` equal to `csv`.
791-
space-delimited | `array` | `query`, `path` | Space separated array values. This option replaces `collectionFormat` equal to `ssv`.
792-
pipe-delimited | `array` | `query`, `path` | Pipe separated array values. This option replaces `collectionFormat` equal to `pipes`.
793-
deep-object | `object` | `query` | Provides a simple way of rendering nested objects using form parameters.
790+
commaDelimited | `array` | `query`, `path` | Comma separated array values. This option replaces `collectionFormat` equal to `csv`.
791+
spaceDelimited | `array` | `query`, `path` | Space separated array values. This option replaces `collectionFormat` equal to `ssv`.
792+
pipeDelimited | `array` | `query`, `path` | Pipe separated array values. This option replaces `collectionFormat` equal to `pipes`.
793+
deepObject | `object` | `query` | Provides a simple way of rendering nested objects using form parameters.
794794

795795

796-
Examples:
797-
Assuming a parameter named `value` with one of the following values:
796+
##### Style Examples
797+
798+
Assuming a parameter named `color` with one of the following values:
798799

799800
```
800-
string -> "hello"
801+
string -> "blue"
801802
array -> ["blue","black","brown"]
802-
object -> { "x" : 100, "y" :200 }
803+
object -> { "R" : 100, "G" :200, "B" : 150 }
803804
```
804805
The following table shows examples of how those values would be rendered.
805806

806807
[`style`](#dataTypeFormat) | `explode` | `empty` | `string` | `array` | `object`
807808
----------- | ------ | -------- | -------- | --------|-------
808-
matrix | false | ;value | ;value=hello | ;value=blue,black,brown | ;value=x,100,y200
809-
matrix | true | n/a | n/a | ;value=blue;value=black;value=brown | ;x=100;y=100
810-
label | false | . | .hello | .blue.black.brown | .x.100.y.200
811-
label | true | n/a | n/a | n/a | .x=100.y=200
812-
form | false | . | value=hello | value=blue,black,brown | value=x,100,y,200
813-
form | true | n/a | n/a | value=blue&value=black&value=brown | x=100&y=200
814-
space-delimited | false | n/a | n/a | blue%20black%20brown | x%20100%20y%20200
815-
pipe-delimited | false | n/a | n/a | blue\|black\|brown | x\|100\|y\|200
816-
deep-object | true | n/a | n/a | n/a | person[name]=Bob&person[lastname]=Brown
809+
matrix | false | ;color | ;color=blue | ;color=blue,black,brown | ;color=R,100,G,200,B,150
810+
matrix | true | ;color | ;color=blue | ;color=blue;color=black;color=brown | ;R=100;G=200;B=150
811+
label | false | . | .blue | .blue.black.brown | .R.100.G.200.B.150
812+
label | true | . | .blue | .blue.black.brown | .R=100.G=200.B=150
813+
form | false | color= | color=blue | color=blue,black,brown | color=x,100,y,200
814+
form | true | color= | color=blue | color=blue&color=black&color=brown | x=100&y=200
815+
spaceDelimited | false | n/a | n/a | blue%20black%20brown | R%20100%20G%20200%20B%20150
816+
pipeDelimited | false | n/a | n/a | blue\|black\|brown | R\|100\|G\|200|G\|150
817+
deepObject | true | n/a | n/a | n/a | person[name]=Bob&person[lastname]=Brown
817818

818819
This object can be extended with [Specification Extensions](#specificationExtensions).
819820

0 commit comments

Comments
 (0)