diff --git a/src/schemas/validation/schema.yaml b/src/schemas/validation/schema.yaml index 199609b5f8..70ce22b1a8 100644 --- a/src/schemas/validation/schema.yaml +++ b/src/schemas/validation/schema.yaml @@ -414,6 +414,15 @@ $defs: then: required: - content + - if: + properties: + in: + const: path + then: + properties: + name: + $comment: 'see OAS 3.2.0 §4.8.2' + pattern: '^[^{}]+$' - if: properties: in: @@ -421,6 +430,7 @@ $defs: then: properties: name: + $comment: 'see RFC9110 §5.1' $ref: '#/$defs/token' dependentSchemas: schema: diff --git a/tests/schema/fail/parameter-object-path-name.yaml b/tests/schema/fail/parameter-object-path-name.yaml new file mode 100644 index 0000000000..d3da04de9d --- /dev/null +++ b/tests/schema/fail/parameter-object-path-name.yaml @@ -0,0 +1,10 @@ +openapi: 3.2.0 +info: + title: path parameter name has a constrained syntax + version: 1.0.0 +components: + parameters: + BadPath: + name: 'Bad{Path}' + in: path + schema: {}