Skip to content

JSON Schema path pattern #2417

Open
Open
@kstasik

Description

@kstasik

Can you explain why there is an escape character before / in json schema of openapi specification?

https://github.com/OAI/OpenAPI-Specification/blob/master/schemas/v3.0/schema.json#L793

I tried to find a reason why it's there in https://json-schema.org/understanding-json-schema/reference/regular_expressions.html and https://www.ecma-international.org/publications/standards/Ecma-262.htm but i'm still not sure about it. I didn't find any explanation in specs.

IMO this regexp is invalid, it only works in most of libraries because javascript automatically fixes invalid usages of escape character.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions