typescript-json-schema
Version:
typescript-json-schema generates JSON Schema files from your Typescript sources
36 lines (35 loc) • 866 B
JSON
{
"type": "object",
"properties": {
"map1": {
"$ref": "#/definitions/MyMap1"
},
"map2": {
"$ref": "#/definitions/MyMap2"
}
},
"required": [ "map1", "map2" ],
"definitions": {
"MyMap1": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/MyType"
}
},
"MyType": {
"type": "object",
"properties": {}
},
"MyMap2": {
"description": "The additionalProperties annotation should be ignored",
"additionalProperties": {
"type": [
"string",
"number"
]
},
"type": "object"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}