json-schema-simulator

1.1.2 • Public • Published

JSON Schema Simulator

Build Status codecov dependency

To simplify the problem and meet the demand, the current solution is quite specific to the generation of tmdoc object instead of a complete support of all the json schema specification.

It is simple to use:

const schemas: JSONSchema6[] = [{
  type: 'any'
}, {
  type: 'array'
}, {
  type: 'boolean'
}, {
  type: 'integer'
}, {
  type: 'number'
}, {
  type: 'object'
}, {
  type: 'string'
}, require('./test/schema.json')]

for (const schema of schemas) {
  load(schema, {generationLimit: 100}).then((r) => {
    console.log(schema)
    const rr = [...r] // if no generationLimit is specified, the spread syntax should not be used.
  })
}

Readme

Keywords

Package Sidebar

Install

npm i json-schema-simulator

Weekly Downloads

0

Version

1.1.2

License

MIT

Unpacked Size

33.3 kB

Total Files

19

Last publish

Collaborators

  • jjyyxx