Delete unused code in chrome/common or mark them as platform specific.
[chromium-blink-merge.git] / tools / json_schema_compiler / test / arrays.json
blob3dfeeb890aebb898437aed9e114be04344f23227
2   {
3     "namespace": "arrays",
4     "description": "The arrays API.",
5     "types": [
6       {
7         "id": "Enumeration",
8         "type": "string",
9         "enum": ["one", "two", "three"]
10       },
11       {
12         "id": "EnumArrayReference",
13         "type": "object",
14         "properties": {
15           "types": {
16             "type": "array",
17             "items": {
18               "$ref": "Enumeration"
19             }
20           }
21         }
22       },
23       {
24         "id": "EnumArrayMixed",
25         "type": "object",
26         "properties": {
27           "infile_enums": {
28             "type": "array",
29             "items": {
30               "$ref": "Enumeration"
31             }
32           },
33           "external_enums": {
34             "type": "array",
35             "items": {
36               "$ref": "enums.Enumeration"
37             }
38           }
39         }
40       },
41       {
42         "id": "OptionalEnumArrayType",
43         "type": "object",
44         "properties": {
45           "types": {
46             "type": "array",
47             "items": {
48               "$ref": "Enumeration"
49             },
50             "optional": true
51           }
52         }
53       },
54       {
55         "id": "BasicArrayType",
56         "type": "object",
57         "properties": {
58           "strings": {
59             "type": "array",
60             "items": {"type": "string"}
61           },
62           "booleans": {
63             "type": "array",
64             "items": {"type": "boolean"}
65           },
66           "numbers": {
67             "type": "array",
68             "items": {"type": "number"}
69           },
70           "integers": {
71             "type": "array",
72             "items": {"type": "integer"}
73           }
74         }
75       },
76       {
77         "id": "Item",
78         "type": "object",
79         "properties": {
80           "val": {
81             "type": "integer"
82           }
83         }
84       },
85       {
86         "id": "RefArrayType",
87         "type": "object",
88         "properties": {
89           "refs": {
90             "type": "array",
91             "items": { "$ref": "Item" }
92           }
93         }
94       }
95     ],
96     "functions": [
97       {
98         "name": "integerArray",
99         "type": "function",
100         "description": "Takes some integers.",
101         "parameters": [
102           {
103             "name": "nums",
104             "type": "array",
105             "items": {"type": "integer"}
106           },
107           {
108             "name": "callback",
109             "type": "function",
110             "parameters": []
111           }
112         ]
113       },
114       {
115         "name": "anyArray",
116         "type": "function",
117         "description": "Takes some Items.",
118         "parameters": [
119           {
120             "name": "anys",
121             "type": "array",
122             "items": {"type": "any"}
123           },
124           {
125             "name": "callback",
126             "type": "function",
127             "parameters": []
128           }
129         ]
130       },
131       {
132         "name": "objectArray",
133         "type": "function",
134         "description": "Takes some Items.",
135         "parameters": [
136           {
137             "name": "objects",
138             "type": "array",
139             "items": {
140               "type": "object",
141               "additionalProperties": {"type": "integer"}
142             }
143           },
144           {
145             "name": "callback",
146             "type": "function",
147             "parameters": []
148           }
149         ]
150       },
151       {
152         "name": "refArray",
153         "type": "function",
154         "description": "Takes some Items.",
155         "parameters": [
156           {
157             "name": "refs",
158             "type": "array",
159             "items": {"$ref": "Item"}
160           },
161           {
162             "name": "callback",
163             "type": "function",
164             "parameters": []
165           }
166         ]
167       },
168       {
169         "name": "justChoices",
170         "type": "function",
171         "description": "Takes some Choices.",
172         "parameters": [
173           {
174             "name": "choices",
175             "choices": [
176               { "type": "integer" },
177               { "type": "boolean" },
178               { "type": "array",
179                 "items": {"$ref": "Item"}
180               }
181             ]
182           },
183           {
184             "name": "callback",
185             "type": "function",
186             "parameters": []
187           }
188         ]
189       },
190       {
191         "name": "choicesArray",
192         "type": "function",
193         "description": "Takes some Choices.",
194         "parameters": [
195           {
196             "name": "choices",
197             "type": "array",
198             "items": {
199               "choices": [
200                 { "type": "integer" },
201                 { "type": "boolean" },
202                 { "type": "array",
203                   "items": {"$ref": "Item"}
204                 }
205               ]
206             }
207           },
208           {
209             "name": "callback",
210             "type": "function",
211             "parameters": []
212           }
213         ]
214       },
215       {
216         "name": "returnIntegerArray",
217         "type": "function",
218         "description": "Returns some integers.",
219         "parameters": [
220           {
221             "name": "callback",
222             "type": "function",
223             "parameters": [
224               {
225                 "name": "integers",
226                 "type": "array",
227                 "items": {"type": "integer"}
228               }
229             ]
230           }
231         ]
232       },
233       {
234         "name": "returnRefArray",
235         "type": "function",
236         "description": "Returns some Items.",
237         "parameters": [
238           {
239             "name": "callback",
240             "type": "function",
241             "parameters": [
242               {
243                 "name": "refs",
244                 "type": "array",
245                 "items": {"$ref": "Item"}
246               }
247             ]
248           }
249         ]
250       }
251     ]
252   }