JSON schemas, examples, and templates for ADIwg metadata standards
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
schema
scripts
test
.editorconfig
.github_changelog_generator
.gitignore
.jshintrc
.travis.yml
CHANGELOG.md
CREDITS
Gemfile
HISTORY.md
LICENSE
README.md
Rakefile
adiwg-json_schemas.gemspec
bower.json
index.js
package.json
yarn.lock

README.md

Build Status Gem Version Bower version npm version

mdJson-schemas

JSON schemas for the ADIwg project and data metadata standard

Ruby Gem

Use with ruby-json-schema/json-schema to validate mdJSON records in Ruby.

Installation

Add this line to your application's Gemfile:

gem 'adiwg-json_schemas'

And then execute:

$ bundle

Or install it yourself as:

$ gem install adiwg-json_schemas

Bower

Install:

$ bower install mdjson-schemas

npm

Install:

$ npm install mdjson-schemas

const Schemas = require('../resources/js/schemas.js');

Usage

The main schema file is schema/schema.json. Load that file in your validator.

NOTE: The schemas use relative addresses for $ref paths. If this causes a problem with the ruby-json-schema/json-schema gem, as a workaround you can pre-load all of the schemas by calling ADIWG::MdjsonSchemas::Utils::load_schemas before validation.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request