Skip to content

Commit ce732af

Browse files
tighten up regex for path items (#2681)
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 (#)."
1 parent 424e706 commit ce732af

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

schemas/v3.1/schema.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,9 @@
503503
},
504504
"then": {
505505
"properties": {
506+
"name": {
507+
"pattern": "[^/#?]+$"
508+
},
506509
"style": {
507510
"default": "simple",
508511
"enum": [

schemas/v3.1/schema.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ $defs:
342342
- in
343343
then:
344344
properties:
345+
name:
346+
pattern: '[^/#?]+$'
345347
style:
346348
default: simple
347349
enum:

0 commit comments

Comments
 (0)