Skip to content

Disallow the intersection JSON path operator #202

@martonvago

Description

@martonvago

Having tidied up unions in #193 , we should also decide what to do about intersections.

In jsonpath, the intersection of two JSON paths is the intersection of the sets of values at those JSON paths.
Seeing that we always care about both the JSON path and the value at that path, the concept of an intersection doesn't really make sense for our use case.

When caring about the paths,

  • the intersection of two direct paths will always be empty ($.name & $.title = {})
  • the intersection of a more general path and a less general path will always be the less general one ($.* & $.title = $.title)

So I think intersections don't make sense in Exclusion, CustomCheck, or RequiredCheck, so we can just disallow them in the appropriate Pydantic check.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions