Skip to content

URL-encoded path params aren't decoded before validation #157

Open
@rachelmarison

Description

@rachelmarison

I've got a path parameter defined in my OpenAPI spec that defines an enum value. When the enum includes a special character that could be URL-encoded, like / for example, it seems that it's not decoded prior to validation.

A snippet of the yaml spec for example:

schema:
  type: string
  enum: ["foo/bar"]

When the path parameter is passed in as a URL-encoded format like foo%2Fbar, the validation will fail.

If we include the encoded variant foo%2Fbar in the enum list in the spec, then the validation passes, but it'd be preferred if we didn't have to do this. Is this expected behavior?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions