diff --git a/src/schemas/validation/schema.yaml b/src/schemas/validation/schema.yaml index b728cbfb98..f4059cb1d3 100644 --- a/src/schemas/validation/schema.yaml +++ b/src/schemas/validation/schema.yaml @@ -193,7 +193,7 @@ $defs: additionalProperties: $ref: '#/$defs/path-item' patternProperties: - '^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$': + '^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$': $comment: Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected propertyNames: pattern: '^[a-zA-Z0-9._-]+$' @@ -341,8 +341,6 @@ $defs: properties: in: const: query - required: - - in then: properties: allowEmptyValue: @@ -369,8 +367,6 @@ $defs: properties: in: const: path - required: - - in then: properties: style: @@ -389,8 +385,6 @@ $defs: properties: in: const: header - required: - - in then: properties: style: @@ -402,8 +396,6 @@ $defs: properties: in: const: query - required: - - in then: properties: style: @@ -422,8 +414,6 @@ $defs: properties: in: const: cookie - required: - - in then: properties: style: @@ -504,7 +494,6 @@ $defs: additionalProperties: $ref: '#/$defs/header-or-reference' style: - default: form enum: - form - spaceDelimited @@ -513,8 +502,22 @@ $defs: explode: type: boolean allowReserved: - default: false type: boolean + dependentSchemas: + style: + properties: + allowReserved: + default: false + explode: + properties: + style: + default: form + allowReserved: + default: false + allowReserved: + properties: + style: + default: form allOf: - $ref: '#/$defs/specification-extensions' - $ref: '#/$defs/styles-for-form' @@ -760,8 +763,6 @@ $defs: properties: type: const: apiKey - required: - - type then: properties: name: @@ -780,8 +781,6 @@ $defs: properties: type: const: http - required: - - type then: properties: scheme: @@ -810,8 +809,6 @@ $defs: properties: type: const: oauth2 - required: - - type then: properties: flows: @@ -824,8 +821,6 @@ $defs: properties: type: const: openIdConnect - required: - - type then: properties: openIdConnectUrl: diff --git a/tests/schema/fail/example-examples.yaml b/tests/schema/fail/example-examples.yaml index 97adcadba6..6ed2f6b333 100644 --- a/tests/schema/fail/example-examples.yaml +++ b/tests/schema/fail/example-examples.yaml @@ -15,6 +15,3 @@ components: examples: a mammalian example: value: bear - - - diff --git a/tests/schema/fail/invalid_schema_types.yaml b/tests/schema/fail/invalid_schema_types.yaml index d295b1f0ed..55e3c900e3 100644 --- a/tests/schema/fail/invalid_schema_types.yaml +++ b/tests/schema/fail/invalid_schema_types.yaml @@ -10,4 +10,3 @@ components: invalid_null: null invalid_number: 0 invalid_array: [] - diff --git a/tests/schema/pass/example-object-examples.yaml b/tests/schema/pass/example-object-examples.yaml index 664b22f429..66f8f54133 100644 --- a/tests/schema/pass/example-object-examples.yaml +++ b/tests/schema/pass/example-object-examples.yaml @@ -29,7 +29,7 @@ components: summary: This is a text example externalValue: https://foo.bar/examples/address-example.txt parameters: - with-example: + with-example: name: zipCode in: query schema: diff --git a/tests/schema/pass/schema-object-deprecated-example-keyword.yaml b/tests/schema/pass/schema-object-deprecated-example-keyword.yaml index f66640f4c3..92fcbb41a5 100644 --- a/tests/schema/pass/schema-object-deprecated-example-keyword.yaml +++ b/tests/schema/pass/schema-object-deprecated-example-keyword.yaml @@ -12,7 +12,6 @@ paths: # the example simple type: object # DEPRECATED: don't use example keyword inside Schema Object - example: { - "numbers": [1, 2], - "flag": null - } + example: + numbers: [1, 2] + flag: null diff --git a/tests/schema/pass/valid_schema_types.yaml b/tests/schema/pass/valid_schema_types.yaml index 4431adcda5..c2459ed37c 100644 --- a/tests/schema/pass/valid_schema_types.yaml +++ b/tests/schema/pass/valid_schema_types.yaml @@ -11,4 +11,3 @@ components: nothing_boolean: false anything_object: {} nothing_object: { not: {} } - diff --git a/tests/schema/pass/webhook-example.yaml b/tests/schema/pass/webhook-example.yaml index 2ac1cda985..44fc73aaa9 100644 --- a/tests/schema/pass/webhook-example.yaml +++ b/tests/schema/pass/webhook-example.yaml @@ -32,4 +32,3 @@ components: type: string tag: type: string -