Skip to content

CS481/simulation-schema

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simulation-schema

The json schema for the simulation factory. This is intended to be used as a submodule.

Usage

A Schema object has two static methods that you need to know:

  1. Validate() takes an Object, validates the schema, and returns the Object if validation succeeds, or throws an error if validation fails
  2. FromJSON() takes a JSON string, validates the schema, and returns the parsed Object if validation succeeds, or throws an error if validation fails.

Schema creation

In order to create a json schema, simply create a class that extends Schema. Override the static schema variable with your json-schema compliant javascript Object. In fancy cases, any of Schema's static methods can be overriden. Ensure your new module calls your class' RegisterSchema() static method.

Resources

About

The json schema for the simulation factory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •