Skip to content

Commit 33417db

Browse files
committed
Added allowEmptyValue
1 parent 260bca0 commit 33417db

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

schemas/v2.0/schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,11 @@
605605
"type": "string",
606606
"description": "The name of the parameter."
607607
},
608+
"allowEmptyValue": {
609+
"type": "boolean",
610+
"default": false,
611+
"description": "allows sending a parameter by name only or with an empty value."
612+
},
608613
"type": {
609614
"type": "string",
610615
"enum": [
@@ -693,6 +698,11 @@
693698
"type": "string",
694699
"description": "The name of the parameter."
695700
},
701+
"allowEmptyValue": {
702+
"type": "boolean",
703+
"default": false,
704+
"description": "allows sending a parameter by name only or with an empty value."
705+
},
696706
"type": {
697707
"type": "string",
698708
"enum": [

versions/2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,9 +567,9 @@ Field Name | Type | Description
567567
---|:---:|---
568568
<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 `"file"`. If `type` is `"file"`, the [`consumes`](#operationConsumes) MUST be either `"multipart/form-data"` or `" application/x-www-form-urlencoded"` and the parameter MUST be [`in`](#parameterIn) `"formData"`.
569569
<a name="parameterFormat"></a>format | `string` | The extending format for the previously mentioned [`type`](#parameterType). See [Data Type Formats](#dataTypeFormat) for further details.
570+
<a name="parameterAllowEmptyValue"/>allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for either `query` or `formData` parameters and allows you to send a parameter with a name only or an empty value. Default value is `false`.
570571
<a name="parameterItems"></a>items | [Items Object](#itemsObject) | **Required if [`type`](#parameterType) is "array".** Describes the type of items in the array.
571572
<a name="parameterCollectionFormat"></a>collectionFormat | `string` | Determines the format of the array if type array is used. Possible values are: <ul><li>`csv` - comma separated values `foo,bar`. <li>`ssv` - space separated values `foo bar`. <li>`tsv` - tab separated values `foo\tbar`. <li>`pipes` - pipe separated values <code>foo&#124;bar</code>. <li>`multi` - corresponds to multiple parameter instances instead of multiple values for a single instance `foo=bar&foo=baz`. This is valid only for parameters [`in`](#parameterIn) "query" or "formData". </ul> Default value is `csv`.
572-
<a name="parameterAllowEmptyValue">allowEmptyValue | `boolean` | Sets the ability to pass empty-valued parameters. This is valid only for either `query` or `formData` parameters and allows you to send a parameter with a name only.
573573
<a name="parameterDefault"></a>default | * | Sets a default value to the parameter. The type of the value depends on the defined [`type`](#parameterType). See http://json-schema.org/latest/json-schema-validation.html#anchor101.
574574
<a name="parameterMaximum"></a>maximum | `number` | See http://json-schema.org/latest/json-schema-validation.html#anchor17.
575575
<a name="parameterExclusiveMaximum"></a>exclusiveMaximum | `boolean` | See http://json-schema.org/latest/json-schema-validation.html#anchor17.

0 commit comments

Comments
 (0)