angular2-json-schema-form
Version:
Angular 2 JSON Schema Form builder
49 lines (48 loc) • 921 B
JSON
{
"schema": {
"language": {
"type": "string",
"title": "Best language",
"enum": [ "JavaScript", "Python", "PHP", "Java", "C++", "other" ]
},
"fantastic": {
"type": "boolean",
"title": "Is it fantastic?",
"required": true
},
"cool": {
"type": "boolean",
"title": "Is it cool?"
},
"cool2": {
"type": "boolean",
"title": "Is it cool again?"
}
},
"form": [ {
"key": "language",
"type": "radios"
}, {
"key": "fantastic",
"type": "radios",
"inline": true,
"toggleNextMap": { "true": true }
}, {
"key": "cool",
"type": "radios",
"titleMap": {
"false": "Not at all",
"true": "Very cool"
}
}, {
"key": "cool2",
"type": "radios",
"options": {
"false": "Not at all",
"true": "Very cool"
}
}, {
"title": "Submit",
"type": "submit"
} ]
}