1.0.3 • Published 4 years ago

jsons2xsd v1.0.3

Weekly downloads
4
License
MIT
Repository
-
Last release
4 years ago

jsons2xsd

JSON-Schema to XML schema converter written in JavaScript

Usage

After installation require / import the module and use it like this:

// import module
const XsdGenerator = require('jsons2xsd');

// do whatever needed to get your schema as either a string or a JSON object
const jsonSchema = getJsonSchema();

// create Generator instance 
const Generator = new XsdGenerator(jsonSchema);

// get a pretty formatted XSD based on the schema
const xsdString = Generator.convert().xmlString;

Not yet implemented

There is a bunch of features which are currently not implemented. Here is a list:

  • References ($ref property in JSON-Schema)
  • Arrays on root level
  • Different JSON-Schema Draft versions
  • Custom XSD Namespacing (namespace is set to http://www.w3.org/2001/XMLSchema)
1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago