Skip to content

Commit 1ffa103

Browse files
tighten up regex for path items
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 92df7ca commit 1ffa103

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
@@ -502,6 +502,9 @@
502502
},
503503
"then": {
504504
"properties": {
505+
"name": {
506+
"pattern": "[^/#?]+$"
507+
},
505508
"style": {
506509
"default": "simple",
507510
"enum": [

schemas/v3.1/schema.yaml

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

0 commit comments

Comments
 (0)