Skip to content

JSON Schema 2019-09 and JTD (v8) #1198

Closed
@epoberezkin

Description

@epoberezkin

Problem

2019-09 introduced two extensions to draft-07 validation process, that are very difficult / impossible to implement in the current Ajv design, specifically:

  • unevaluatedKeyword that depends on annotation collection (specifically, collection of "evaluated" properties in visited and successfully validated branches), and requires validation of all dependent branches without short-circuiting.
  • recursiveRef that depends on dynamic ref scoping

In addition to that, it would help rethinking the definition of "keyword" in Ajv and eliminating the difference between "standard" and "custom" keyword (Ajv taxonomy) and replacing it with "applicators" and "vocabularies" of "assertions" and "annotations" (JSON Schema taxonomy).

Some other challenges that can be addressed:

TODO

  • types to support new taxonomy of keywords
  • formalise reference resolution algorithm simplify reference resolution implementation
  • formalise annotation collection algorithm only implemented to support unevaluatedProperties/Items
  • formalise code generation algorithm
  • split formats to a separate package
  • implement in typescript
  • drop draft4 support
  • restructure docs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions