File tree 2 files changed +91
-0
lines changed
2 files changed +91
-0
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "schema" : {
3
+ "type" : " object" ,
4
+ "title" : " Comment" ,
5
+ "required" : [" users" ],
6
+ "properties" : {
7
+ "users" : {
8
+ "type" : " array" ,
9
+ "items" : {
10
+ "type" : " object" ,
11
+ "properties" : {
12
+ "name" : {
13
+ "title" : " Name" ,
14
+ "type" : " string"
15
+ },
16
+ "comments" : {
17
+ "type" : " array" ,
18
+ "items" : {
19
+ "type" : " object" ,
20
+ "properties" : {
21
+ "comment" : {
22
+ "title" : " Comment" ,
23
+ "type" : " string" ,
24
+ "maxLength" : 20 ,
25
+ "validationMessage" : " Don't be greedy!"
26
+ },
27
+ "tags" : {
28
+ "title" : " Tags" ,
29
+ "type" : " array" ,
30
+ "items" : {
31
+ "type" : " object" ,
32
+ "properties" : {
33
+ "tag" : {
34
+ "title" : " Tag" ,
35
+ "type" : " string"
36
+ }
37
+ }
38
+ },
39
+ "maxLength" : 5
40
+ }
41
+ },
42
+ "required" : [" comment" ]
43
+ }
44
+ }
45
+ },
46
+ "required" : [" name" ]
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "form" : [
52
+ {
53
+ "type" : " help" ,
54
+ "helpvalue" : " <h4>Array Example</h4><p>Try adding a couple of forms, reorder by drag'n'drop.</p>"
55
+ },
56
+ {
57
+ "key" : " users" ,
58
+ "add" : " New" ,
59
+ "style" : {
60
+ "add" : " btn-success"
61
+ },
62
+ "items" : [
63
+ " users[].name" ,
64
+ {
65
+ "key" : " users[].comments" ,
66
+ "items" : [
67
+ {
68
+ "key" : " users[].comments[].comment" ,
69
+ "type" : " textarea"
70
+ },
71
+ {
72
+ "key" : " users[].comments[].tags" ,
73
+ "items" : [
74
+ {
75
+ "key" : " users[].comments[].tags[].tag" ,
76
+ "type" : " text"
77
+ }
78
+ ]
79
+ }
80
+ ]
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "type" : " submit" ,
86
+ "style" : " btn-info" ,
87
+ "title" : " OK"
88
+ }
89
+ ]
90
+ }
Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ <h3>Schema</h3>
236
236
app . controller ( 'TestCtrl' , function ( $scope , $http , $location ) {
237
237
238
238
$scope . tests = [
239
+ { name : "Deep Array" , data : 'data/deep-array.json' } ,
239
240
{ name : "Simple" , data : 'data/simple.json' } ,
240
241
{ name : "Basic JSON Schema Type" , data : 'data/types.json' } ,
241
242
{ name : "Bootstrap Grid" , data : 'data/grid.json' } ,
You can’t perform that action at this time.
0 commit comments