Skip to content

KarrLab/datanator_pattern_design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo for storing and validating $jsonSchema of documents stored in MongoDB

Introduction

Background on JSON Schema http://json-schema.org/.

Note files in components directory cannot be used directly for MongoDB's $jsonSchema because MongoDB omits $ref. Use files in compiled directory where $ref is resolved using components/resolve_ref.py.

Instructions

To validate schema:

pip install jsonschema
jsonschema -i sample_files/taxon/taxon_incorrect.json components/taxon.json
jsonschema -i sample_files/taxon/taxon_correct.json components/taxon.json

To compile schema:

cd components
change url to appropriate name
python resolve_ref.py

The compiled schema will be stored in compiled directory.

About

Designing pattern of Datanator data models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages