Skip to content

Commit

Permalink
tighten up regex for path items (#2681)
Browse files Browse the repository at this point in the history
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 (#)."
  • Loading branch information
karenetheridge committed Sep 27, 2021
1 parent 424e706 commit ce732af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schemas/v3.1/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,9 @@
},
"then": {
"properties": {
"name": {
"pattern": "[^/#?]+$"
},
"style": {
"default": "simple",
"enum": [
Expand Down
2 changes: 2 additions & 0 deletions schemas/v3.1/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ $defs:
- in
then:
properties:
name:
pattern: '[^/#?]+$'
style:
default: simple
enum:
Expand Down

0 comments on commit ce732af

Please sign in to comment.