Skip to content

why schema keyword value can not be a path ? #826

@DaiKiQi

Description

@DaiKiQi

I have recently used json schema to help validate json data.
but i found that its hard to validate cascade relation.
for example:

      "ageRange": {
        "minAge": 20,
        "maxAge": 30
      }

I want to limit 18<minAge<maxAge<50. its hard to limit minAge<maxAge. Because keyword minimum's value must be number.
why schema keyword value can not be a path?like this:

"maxAge": {
"minimum": "$.ageRange.minAge",
"exclusiveMaximum": 50
}
do you have any idea to implement this?

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