UNPKG

xsd2json

Version:

Translate an XML Schema into equivalent JSON Schema

34 lines (33 loc) 597 B
{ "$schema": "http://json-schema.org/draft-04/schema#", "definitions": { "pets": { "type": "object", "properties": { "dog": { "type": "string" }, "cat": { "type": "string" } }, "required": ["dog", "cat"] }, "morePets": { "allOf": [ { "$ref": "#/definitions/pets" }, { "type": "object", "properties": { "horse": { "type": "string" } }, "required": ["horse"] } ] } } }