angular2-json-schema-form
Version:
Angular 2 JSON Schema Form builder
69 lines (68 loc) • 1.56 kB
JSON
{
"schema": {
"v3customer": {
"title": "Customer",
"description": "json-schema v3 style 'required'",
"type": "object",
"required": true,
"properties": {
"name": {
"required": true,
"title": "Name",
"type": "string"
},
"address": {
"title": "Address",
"type": "object",
"properties": {
"city": {
"required": true,
"title": "City",
"type": "string"
},
"street": {
"required": true,
"title": "Street",
"type": "string"
},
"zip": {
"title": "Zip",
"type": "string"
}
}
}
}
},
"v4customer": {
"title": "CustomerV4",
"description": "json-schema v4 style 'required'",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string"
},
"address": {
"title": "Address",
"type": "object",
"properties": {
"city": {
"title": "City",
"type": "string"
},
"street": {
"title": "Street",
"type": "string"
},
"zip": {
"title": "Zip",
"type": "string"
}
},
"required": [ "street", "city" ]
}
},
"required": [ "name" ]
}
}
}