diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index c690c98be6..9f1524f4dc 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -440,10 +440,6 @@ "default": false, "type": "boolean" }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - }, "schema": { "$dynamicRef": "#meta" }, @@ -469,6 +465,24 @@ ] } ], + "if": { + "properties": { + "in": { + "const": "query" + } + }, + "required": [ + "in" + ] + }, + "then": { + "properties": { + "allowEmptyValue": { + "default": false, + "type": "boolean" + } + } + }, "dependentSchemas": { "schema": { "properties": { @@ -477,10 +491,6 @@ }, "explode": { "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" } }, "allOf": [ @@ -578,6 +588,10 @@ "pipeDelimited", "deepObject" ] + }, + "allowReserved": { + "default": false, + "type": "boolean" } } } diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index a07793617d..bf44567463 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -311,9 +311,6 @@ $defs: deprecated: default: false type: boolean - allowEmptyValue: - default: false - type: boolean schema: $dynamicRef: '#meta' content: @@ -328,6 +325,17 @@ $defs: - schema - required: - content + if: + properties: + in: + const: query + required: + - in + then: + properties: + allowEmptyValue: + default: false + type: boolean dependentSchemas: schema: properties: @@ -335,9 +343,6 @@ $defs: type: string explode: type: boolean - allowReserved: - default: false - type: boolean allOf: - $ref: '#/$defs/examples' - $ref: '#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path' @@ -398,7 +403,9 @@ $defs: - spaceDelimited - pipeDelimited - deepObject - + allowReserved: + default: false + type: boolean styles-for-cookie: if: properties: