UNPKG

angular2-json-schema-form

Version:
63 lines (62 loc) 1.31 kB
{ "schema": { "type": "object", "properties": { "friendsA": { "$ref": "#/definitions/friends" }, "friendsB": { "$ref": "#/definitions/friends" } }, "definitions": { "friends": { "type": "array", "items": { "type": "object", "title": "Friend", "properties": { "nick": { "type": "string", "title": "Nickname" }, "animals": { "type": "array", "items": { "type": "string", "title": "Animal name" }, "default": [ "dog", "cat" ] } } } } } }, "customFormItems": { "friendsB": { "type": "array", "key": "friendsB", "title": "Friends B", "readOnly": true, "items": { "type": "section", "items": [ { "type": "array", "key": "friendsB[].animals", "items": [ "friendsB[].animals[]" ] }, "friendsB[].nick" ] } } }, "value": { "friendsB": [ { "nick": "B", "animals": [ "fish", "bee" ] }, { "nick": "B2", "animals": [ "bee", "cat" ] } ] } }