Skip to content

"path parameters MUST NOT contain any unescaped “generic syntax” characters" #2804

@karenetheridge

Description

@karenetheridge

at https://spec.openapis.org/oas/v3.1.0#path-templating:

The value for these path parameters MUST NOT contain any unescaped “generic syntax” characters described by [RFC3986]: forward slashes (/), question marks (?), or hashes (#).

Is this referring to the name of the path parameter, or the value itself?

For example, for the path template /pets/{petId}, is it "petId" itself (which is the name clause in the parameter specification) that cannot contain these characters -- that is, a restriction on the openapi document itself? or is it the value of this parameter, at runtime, that cannot contain these characters, for example "cat_01" in the URI /pets/cat_01?

Either way, the language in the specification here could do with a little tightening.

This question has also come up in #2564.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs attentionThe author has replied and people with triage rights should take action.param serializationIssues related to parameter and/or header serialization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions