From 9efdcedd9ade897a7812bd8c6383308d7f9138c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81xel=20Costas=20Pena?= Date: Wed, 5 Feb 2020 20:41:02 +0100 Subject: [PATCH] Make PathItem operation properties specific. Avoid misuse of `patternProperties` feature. Fix OAI/OpenAPI-Specification#2126 --- schemas/v3.0/schema.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/schemas/v3.0/schema.yaml b/schemas/v3.0/schema.yaml index 13e47ff08d..e2d09983cd 100644 --- a/schemas/v3.0/schema.yaml +++ b/schemas/v3.0/schema.yaml @@ -495,6 +495,22 @@ definitions: type: string description: type: string + get: + $ref: '#/definitions/Operation' + put: + $ref: '#/definitions/Operation' + post: + $ref: '#/definitions/Operation' + delete: + $ref: '#/definitions/Operation' + options: + $ref: '#/definitions/Operation' + head: + $ref: '#/definitions/Operation' + patch: + $ref: '#/definitions/Operation' + trace: + $ref: '#/definitions/Operation' servers: type: array items: @@ -507,8 +523,6 @@ definitions: - $ref: '#/definitions/Reference' uniqueItems: true patternProperties: - '^(get|put|post|delete|options|head|patch|trace)$': - $ref: '#/definitions/Operation' '^x-': {} additionalProperties: false