typescript-json-schema
Version:
typescript-json-schema generates JSON Schema files from your Typescript sources
35 lines (34 loc) • 1.01 kB
JSON
{
"type": "object",
"required": [ "FieldWithAnonType" ],
"properties": {
"FieldWithAnonType": {
"type": "object",
"required": [ "SubfieldA", "SubfieldB", "SubfieldC"],
"properties": {
"SubfieldA": {
"type": "number"
},
"SubfieldB": {
"type": [
"string",
"number"
]
},
"SubfieldC": {
"type": "object",
"required": [ "SubsubfieldA"],
"properties": {
"SubsubfieldA": {
"type": "array",
"items": {
"type": "number"
}
}
}
}
}
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}