Fix a type mismatch on Windows caused by r201738.
[chromium-blink-merge.git] / tools / json_schema_compiler / test / simple_api.json
blob82d77b8da60f75677c21ea29d4cbca45c2512579
2   {
3     "namespace": "simple_api",
4     "types": [
5       {
6         "id": "TestType",
7         "type": "object",
8         "properties": {
9           "string": {
10             "type": "string",
11             "description": "Some string."
12           },
13           "boolean": {
14             "type": "boolean",
15             "description": "Some boolean."
16           },
17           "number": {
18             "type": "number",
19             "description": "Some double."
20           },
21           "integer": {
22             "type": "integer",
23             "description": "Some integer."
24           }
25         }
26       }
27     ],
28     "functions": [
29       {
30         "name": "incrementInteger",
31         "type": "function",
32         "description": "Increments the given integer.",
33         "parameters": [
34           {
35             "name": "num",
36             "type": "integer"
37           },
38           {
39             "name": "callback",
40             "type": "function",
41             "parameters": [
42               {
43                 "name": "result",
44                 "type": "integer",
45                 "description": "The incremented value."
46               }
47             ]
48           }
49         ]
50       },
51       {
52         "name": "optionalString",
53         "type": "function",
54         "description": "Takes a string. Or not.",
55         "parameters": [
56           {
57             "name": "str",
58             "type": "string",
59             "optional": true
60           },
61           {
62             "name": "callback",
63             "type": "function",
64             "parameters": []
65           }
66         ]
67       },
68       {
69         "name": "optionalBeforeRequired",
70         "type": "function",
71         "description": "Takes an optional parameter followed by a required one.",
72         "parameters": [
73           {
74             "name": "first",
75             "type": "string",
76             "optional": true
77           },
78           {
79             "name": "second",
80             "type": "string"
81           },
82           {
83             "name": "callback",
84             "type": "function",
85             "parameters": []
86           }
87         ]
88       },
89       {
90         "name": "optionalCallbackParams",
91         "type": "function",
92         "description": "Gives back a string. Or not.",
93         "parameters": [
94           {
95             "name": "callback",
96             "type": "function",
97             "parameters": [
98               {
99                 "name": "result",
100                 "$ref": "TestType",
101                 "description": "True if the extension has the specified permissions."
102               }
103             ]
104           }
105         ]
106       },
107       {
108         "name": "getTestType",
109         "type": "function",
110         "description": "Return a TestType.",
111         "parameters": [
112           {
113             "name": "callback",
114             "type": "function",
115             "parameters": [
116               {
117                 "name": "result",
118                 "$ref": "TestType",
119                 "description": "A TestType."
120               }
121             ]
122           }
123         ]
124       }
125     ],
126     "events": [
127       {
128         "name": "onIntegerFired",
129         "type": "function",
130         "description": "Fired when an integer is ready.",
131         "parameters": [
132           {
133             "name": "someInteger",
134             "type": "integer"
135           }
136         ]
137       },
138       {
139         "name": "onStringFired",
140         "type": "function",
141         "description": "Fired when a string is ready.",
142         "parameters": [
143           {
144             "name": "someString",
145             "type": "string"
146           }
147         ]
148       },
149       {
150         "name": "onTestTypeFired",
151         "type": "function",
152         "description": "Fired when a TestType is ready.",
153         "parameters": [
154           {
155             "name": "someTestType",
156             "$ref": "TestType"
157           }
158         ]
159       }
160     ]
161   }