- add sources.
[platform/framework/web/crosswalk.git] / src / tools / json_schema_compiler / test / objects.json
1 [
2   {
3     "namespace": "objects",
4     "description": "The objects API.",
5     "types": [],
6     "functions": [
7       {
8         "name": "objectParam",
9         "type": "function",
10         "description": "Takes an object.",
11         "parameters": [
12           {
13             "name": "info",
14             "type": "object",
15             "properties": {
16               "strings": {
17                 "type": "array",
18                 "items": {"type": "string"}
19               },
20               "integer": {
21                 "type": "integer"
22               },
23               "boolean": {
24                 "type": "boolean"
25               }
26             }
27           },
28           {
29             "name": "callback",
30             "type": "function",
31             "parameters": []
32           }
33         ]
34       },
35       {
36         "name": "returnsObject",
37         "description": "Returns an object.",
38         "type": "function",
39         "parameters": [
40           {
41             "name": "callback",
42             "type": "function",
43             "parameters": [
44               {
45                 "name": "info",
46                 "type": "object",
47                 "properties": {
48                   "state": {
49                     "type": "string",
50                     "enum": ["foo", "bar", "baz"]
51                   }
52                 }
53               }
54             ]
55           }
56         ]
57       },
58       {
59         "name": "returnsTwoObjects",
60         "description": "Return two objects.",
61         "type": "function",
62         "parameters": [
63           {
64             "name": "callback",
65             "type": "function",
66             "parameters": [
67               {
68                 "name": "firstInfo",
69                 "type": "object",
70                 "properties": {
71                   "state": {
72                     "type": "string",
73                     "enum": ["foo", "bar", "baz"]
74                   }
75                 }
76               },
77               {
78                 "name": "secondInfo",
79                 "type": "object",
80                 "properties": {
81                   "state": {
82                     "type": "string",
83                     "enum": ["spam", "ham", "eggs"]
84                   }
85                 }
86               }
87             ]
88           }
89         ]
90       }
91     ],
92     "events": [
93       {
94         "name": "onObjectFired",
95         "type": "function",
96         "description": "Fired when an object is ready.",
97         "parameters": [
98           {
99             "name": "someObject",
100             "type": "object",
101             "properties": {
102               "state": {
103                 "type": "string",
104                 "enum": ["foo", "bar", "baz"]
105               }
106             }
107           }
108         ]
109       },
110       {
111         "name": "onTwoObjectsFired",
112         "type": "function",
113         "description": "Fired when two objects are ready.",
114         "parameters": [
115           {
116             "name": "firstObject",
117             "type": "object",
118             "properties": {
119               "state": {
120                 "type": "string",
121                 "enum": ["foo", "bar", "baz"]
122               }
123             }
124           },
125           {
126             "name": "secondObject",
127             "type": "object",
128             "properties": {
129               "state": {
130                 "type": "string",
131                 "enum": ["spam", "ham", "eggs"]
132               }
133             }
134           }
135         ]
136       }
137     ]
138   }
139 ]
140