Skip to content

Commit c422953

Browse files
Merge pull request #5263 from karenetheridge/ether/3.2-parameter-name-patterns
v3.2: apply the ABNF for path parameter names, OAS 3.2.0 §4.8.2
2 parents 8c0f752 + fdd18b0 commit c422953

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/schemas/validation/schema.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,13 +414,23 @@ $defs:
414414
then:
415415
required:
416416
- content
417+
- if:
418+
properties:
419+
in:
420+
const: path
421+
then:
422+
properties:
423+
name:
424+
$comment: 'see OAS 3.2.0 §4.8.2'
425+
pattern: '^[^{}]+$'
417426
- if:
418427
properties:
419428
in:
420429
const: header
421430
then:
422431
properties:
423432
name:
433+
$comment: 'see RFC9110 §5.1'
424434
$ref: '#/$defs/token'
425435
dependentSchemas:
426436
schema:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
openapi: 3.2.0
2+
info:
3+
title: path parameter name has a constrained syntax
4+
version: 1.0.0
5+
components:
6+
parameters:
7+
BadPath:
8+
name: 'Bad{Path}'
9+
in: path
10+
schema: {}

0 commit comments

Comments
 (0)