Skip to content

Commit bedcc17

Browse files
committed
Combine HTTP Methods in patternProperties
1 parent 26cf125 commit bedcc17

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

schemas/v3.0/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,10 @@ Such data would become invalid:
2222
```json
2323
{"$ref": "#", "unknown": 1}
2424
```
25+
26+
## Combine HTTP Methods in `patternProperties`
27+
28+
```yaml
29+
patternProperties:
30+
'^(get|put|post|delete|options|head|patch|trace)$': $ref: '#/definitions/Operation'
31+
```

schemas/v3.0/schema.yaml

+2-16
Original file line numberDiff line numberDiff line change
@@ -556,22 +556,6 @@ definitions:
556556
type: string
557557
description:
558558
type: string
559-
get:
560-
$ref: '#/definitions/Operation'
561-
put:
562-
$ref: '#/definitions/Operation'
563-
post:
564-
$ref: '#/definitions/Operation'
565-
delete:
566-
$ref: '#/definitions/Operation'
567-
options:
568-
$ref: '#/definitions/Operation'
569-
head:
570-
$ref: '#/definitions/Operation'
571-
patch:
572-
$ref: '#/definitions/Operation'
573-
trace:
574-
$ref: '#/definitions/Operation'
575559
servers:
576560
type: array
577561
items:
@@ -584,6 +568,8 @@ definitions:
584568
- $ref: '#/definitions/Reference'
585569
uniqueItems: true
586570
patternProperties:
571+
'^(get|put|post|delete|options|head|patch|trace)$':
572+
$ref: '#/definitions/Operation'
587573
'^x-': {}
588574
additionalProperties: false
589575

0 commit comments

Comments
 (0)