Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 16 additions & 21 deletions src/schemas/validation/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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._-]+$'
Expand Down Expand Up @@ -341,8 +341,6 @@ $defs:
properties:
in:
const: query
required:
- in
then:
properties:
allowEmptyValue:
Expand All @@ -369,8 +367,6 @@ $defs:
properties:
in:
const: path
required:
- in
then:
properties:
style:
Expand All @@ -389,8 +385,6 @@ $defs:
properties:
in:
const: header
required:
- in
then:
properties:
style:
Expand All @@ -402,8 +396,6 @@ $defs:
properties:
in:
const: query
required:
- in
then:
properties:
style:
Expand All @@ -422,8 +414,6 @@ $defs:
properties:
in:
const: cookie
required:
- in
then:
properties:
style:
Expand Down Expand Up @@ -504,7 +494,6 @@ $defs:
additionalProperties:
$ref: '#/$defs/header-or-reference'
style:
default: form
enum:
- form
- spaceDelimited
Expand All @@ -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'
Expand Down Expand Up @@ -760,8 +763,6 @@ $defs:
properties:
type:
const: apiKey
required:
- type
then:
properties:
name:
Expand All @@ -780,8 +781,6 @@ $defs:
properties:
type:
const: http
required:
- type
then:
properties:
scheme:
Expand Down Expand Up @@ -810,8 +809,6 @@ $defs:
properties:
type:
const: oauth2
required:
- type
then:
properties:
flows:
Expand All @@ -824,8 +821,6 @@ $defs:
properties:
type:
const: openIdConnect
required:
- type
then:
properties:
openIdConnectUrl:
Expand Down
3 changes: 0 additions & 3 deletions tests/schema/fail/example-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ components:
examples:
a mammalian example:
value: bear



1 change: 0 additions & 1 deletion tests/schema/fail/invalid_schema_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ components:
invalid_null: null
invalid_number: 0
invalid_array: []

2 changes: 1 addition & 1 deletion tests/schema/pass/example-object-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion tests/schema/pass/valid_schema_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ components:
nothing_boolean: false
anything_object: {}
nothing_object: { not: {} }

1 change: 0 additions & 1 deletion tests/schema/pass/webhook-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ components:
type: string
tag:
type: string