UNPKG

typescript-json-schema

Version:

typescript-json-schema generates JSON Schema files from your Typescript sources

38 lines (37 loc) 1.32 kB
{ "description": "Description of MyObject, a top level object,\nwhich also has a comment that spans\nmultiple lines", "additionalProperties": false, "type": "object", "properties": { "opacity": { "type": "number", "description": "Description of opacity, a field with min/max values", "minimum": 0, "maximum": 100 }, "position": { "description": "Description of field position, of aliased type Vector3D, which should inherit its annotations", "minItems": 3, "maxItems": 3, "type": "array", "items": { "type": "number" } }, "rotation": { "type": "object", "properties": { "yaw": { "type": "number", "description": "Description of the value yaw inside an anonymous type, with min/max annotations", "minimum": -90, "maximum": 90 } }, "required": [ "yaw" ], "description": "Description of rotation, a field with an anonymous type" } }, "required": [ "opacity", "position", "rotation" ], "$schema": "http://json-schema.org/draft-04/schema#" }