Back to Explore

epoberezkin/json-schema-traverse

GitHub
1 watchersOpen source

Last release: 12/13/2020

json-schema-traverse traverses a JSON Schema and calls a callback for each schema object, including the root, using a pre-order traversal. It can also call separate pre and post functions, provides JSON pointer and parent/context details to the callback, and does not resolve $ref values.

Project status

  • The repository appears effectively unmaintained for active development, with the last observed upstream push on 2021-07-26 and the most recent tagged updates dated 2020-12-13 (no newer update summaries are shown here).
  • The apparent update cadence is very low, with multiple updates clustered in late 2020 (v0.5.0 and v1.0.0 on 2020-12-13), and the previous known update much earlier (v0.4.1 on 2019-11-24).

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.0.0

    12/13/2020

    Release v1.0.0 adds support for traversing JSON Schema draft-2019-09 by recognizing the $defs keyword. In the same release, the repo also migrates CI and publishing to GitHub Actions (replacing Travis) and makes minor dev dependency changes.

    Features
  • v0.5.0

    12/13/2020

    Release v0.5.0 adds traversal support for the JSON Schema keywords if, then, else, and introduces a new TypeScript declaration file (index.d.ts). It also updates various project tooling and CI configuration (dev dependencies, lint settings, and Travis Node versions).

    Features
  • v0.4.1

    11/24/2019

    Release v0.4.1 makes the schema traversal skip the `default` keyword so that traversal does not descend into values under `default`. The package version is bumped to 0.4.1.

  • v0.3.0

    5/8/2018

    v0.3.0 introduces an `allKeys` traversal option, allowing the library to recurse into schema objects found under keywords that are not part of its standard keyword lists. The implementation also adds a hardcoded skip list to avoid traversing certain constraint-like keywords even when `allKeys` is enabled.

    Features
  • v0.4.0

    5/8/2018

    v0.4.0 adds support for pre- and post-order callbacks to json-schema-traverse. The traversal now invokes a pre hook before descending into child schema nodes, and a post hook after all children have been visited. The release notes state this is backwards compatible, and the code includes explicit legacy argument handling.

    Features
  • v0.2.0

    6/14/2017

    Release v0.2.0 modifies json-schema-traverse so the traversal callback receives an additional argument: the JSON pointer to the parent schema object. This is implemented by threading a new internal parameter (parentJsonPtr) through the recursive _traverse calls and updating tests and the README accordingly.

    BreakingFeatures
  • v0.1.0

    6/5/2017

    This release changes how schema traversal works during callback execution. When traversing schemas, the callback now receives only schema objects, not any other values that may have been included previously.

    Breaking