Skip to content

JSON Schema Reference Resolver

Notifications You must be signed in to change notification settings

EuPathDB-Infra/js-deref

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Schema Reference Resolver

GitHub tag Travis (.org) branch

Recursively resolves "$ref" properties and appends the external schema content to the root "definitions" object.

If an output directory is provided, the tool writes the dereferenced json files to the output directory, mirroring the structure of the input directory.

If no output directory is provided, the tool simply performs the validation checks.

Warning
This utility is not presently suited for general use as a json schema ref resolver. It is tailored to the specific case of absolute filesystem path references to the root of a java project’s resource directory.

Usage

$ js-deref <input_dir> [output_dir]

Rule checks

Out of the rules established for the JSON Schema files in the WDK, the following are enforced by js-deref:

Out of Scope / Missing

A JSON Schema file is referenced which is not present in the resources directory.

Absolute Refs

All references must be "absolute" to the root of the resources directory. (These paths will become absolute paths in the compiled WDK jar).