Skip to content

Commit 9efdced

Browse files
Make PathItem operation properties specific.
Avoid misuse of `patternProperties` feature. Fix #2126
1 parent 2d6a180 commit 9efdced

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

schemas/v3.0/schema.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,22 @@ definitions:
495495
type: string
496496
description:
497497
type: string
498+
get:
499+
$ref: '#/definitions/Operation'
500+
put:
501+
$ref: '#/definitions/Operation'
502+
post:
503+
$ref: '#/definitions/Operation'
504+
delete:
505+
$ref: '#/definitions/Operation'
506+
options:
507+
$ref: '#/definitions/Operation'
508+
head:
509+
$ref: '#/definitions/Operation'
510+
patch:
511+
$ref: '#/definitions/Operation'
512+
trace:
513+
$ref: '#/definitions/Operation'
498514
servers:
499515
type: array
500516
items:
@@ -507,8 +523,6 @@ definitions:
507523
- $ref: '#/definitions/Reference'
508524
uniqueItems: true
509525
patternProperties:
510-
'^(get|put|post|delete|options|head|patch|trace)$':
511-
$ref: '#/definitions/Operation'
512526
'^x-': {}
513527
additionalProperties: false
514528

0 commit comments

Comments
 (0)