Skip to content

adiwg/mdJson-schemas

Folders and files

NameName
Last commit message
Last commit date
Dec 10, 2024
Dec 11, 2024
Feb 25, 2025
Feb 25, 2025
Dec 20, 2024
Oct 10, 2018
Aug 31, 2017
May 17, 2017
Mar 19, 2024
Aug 31, 2017
Sep 12, 2017
Sep 11, 2019
Dec 20, 2024
Mar 14, 2014
May 6, 2014
Mar 4, 2025
May 17, 2017
Aug 31, 2017
Dec 20, 2024
Feb 6, 2017
Dec 20, 2024
Sep 3, 2017
Mar 4, 2025
Mar 4, 2025

Repository files navigation

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-mdjson_schemas'

And then execute:

$ bundle

Or install it yourself as:

$ gem install adiwg-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

See CONTRIBUTING file

View the CONTRIBUTING.md file for additional guidelines related to developing mdJson schemas.