3.1 Schema: Fix anchoring in regexes
MODIFY
schemas/v3.1/schema.json
schemas/v3.1/schema.json
}
},
"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._-]+$"
}
},
"patternProperties": {
- "^get|post|delete|options|head|patch|trace$": {
+ "^(get|post|delete|options|head|patch|trace)$": {
"$ref": "#/$defs/operation"
}
},
}
},
"patternProperties": {
- "[1-5][0-9X]{2}": {
+ "^[1-5][0-9X]{2}$": {
"$ref": "#/$defs/response-or-reference"
}
},

MODIFY
schemas/v3.1/schema.yaml
schemas/v3.1/schema.yaml
@@ -176,7 +176,7 @@ $defs:
additionalProperties:
$ref: '#/$defs/path-item-or-reference'
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._-]+$'
@@ -207,7 +207,7 @@ $defs:
items:
$ref: '#/$defs/parameter-or-reference'
patternProperties:
- '^get|post|delete|options|head|patch|trace$':
+ '^(get|post|delete|options|head|patch|trace)$':
$ref: '#/$defs/operation'
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false
@@ -510,7 +510,7 @@ $defs:
default:
$ref: '#/$defs/response-or-reference'
patternProperties:
- '[1-5][0-9X]{2}':
+ '^[1-5][0-9X]{2}$':
$ref: '#/$defs/response-or-reference'
$ref: '#/$defs/specification-extensions'
unevaluatedProperties: false

3.1 Schema: Fix anchoring in regexes