typescript-json-schema
Version:
typescript-json-schema generates JSON Schema files from your Typescript sources
47 lines • 1.11 kB
JSON
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"MyAlias": {
"$ref": "#/definitions/MySubObject",
"description": "My sub object"
},
"MyString": {
"description": "My string",
"type": "string"
},
"MySubObject": {
"description": "My sub object",
"properties": {
"propA": {
"type": "number"
},
"propB": {
"type": "number"
}
},
"required": [
"propA",
"propB"
],
"type": "object"
}
},
"description": "My Object",
"properties": {
"alias": {
"$ref": "#/definitions/MyAlias"
},
"object": {
"$ref": "#/definitions/MySubObject"
},
"primitive": {
"$ref": "#/definitions/MyString"
}
},
"required": [
"primitive",
"object",
"alias"
],
"type": "object"
}