maas-schemas
Schemas for MaaS infrastructure
Last updated 4 months ago by maasglobal .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install maas-schemas 
SYNC missed versions from official npm registry.

MaaS-schemas submodule

Build Status

This repository contains the JSON schemas used by MaaS.

Features

  • Newest JSON schemas spec + AJV
  • Out of the box validator

Documentation

To generate documentation from JSON Schemas, execute:

yarn build
yarn docs

After that, documentation will be available in Markdown format in docs/ folder and in HTML format in docs/html folder.

JavaScript API

/**
 *  Validate an object by first resolving the corresponding schema by schemaId
 *  NOTE: It is recommended to use schema $id instead of raw schema object
 *
 *  @param {Object/String} schema/schema.$id - schema from the schemas folder. If given as a whole, will extract $id from the schema. None existed schema will be re-validate. If given only $id, will use that to reference to schema
 *  @param {Object} object - input testing subject
 *  @return {Object} resolve w/validated object
 *  @throws {ValidationError}
 */
function validate(schema, object, options)

Current Tags

  • 10.6.0                                ...           latest (4 months ago)

26 Versions

  • 10.6.0                                ...           4 months ago
  • 10.5.0                                ...           5 months ago
  • 10.0.1                                ...           6 months ago
  • 3.3.0                                ...           2 years ago
  • 3.2.0                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.7.1                                ...           2 years ago
  • 2.7.0                                ...           2 years ago
  • 2.6.0                                ...           2 years ago
  • 2.5.0                                ...           2 years ago
  • 2.4.0                                ...           2 years ago
  • 2.3.0                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.1.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |