From 1ffa10351a5008e57666be7634f03939cc0a5d0d Mon Sep 17 00:00:00 2001 From: Karen Etheridge Date: Mon, 23 Aug 2021 16:30:25 -0700 Subject: [PATCH] tighten up regex for path items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://spec.openapis.org/oas/v3.1.0#pathTemplating "The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [[!RFC3986]]: forward slashes (/), question marks (?), or hashes (#)." --- schemas/v3.1/schema.json | 3 +++ schemas/v3.1/schema.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/schemas/v3.1/schema.json b/schemas/v3.1/schema.json index 44fdbb92b8..866ae05f31 100644 --- a/schemas/v3.1/schema.json +++ b/schemas/v3.1/schema.json @@ -502,6 +502,9 @@ }, "then": { "properties": { + "name": { + "pattern": "[^/#?]+$" + }, "style": { "default": "simple", "enum": [ diff --git a/schemas/v3.1/schema.yaml b/schemas/v3.1/schema.yaml index 39b90f34de..a789a93bdc 100644 --- a/schemas/v3.1/schema.yaml +++ b/schemas/v3.1/schema.yaml @@ -341,6 +341,8 @@ $defs: - in then: properties: + name: + pattern: '[^/#?]+$' style: default: simple enum: