Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: tools/json_schema_compiler/test/objects.json

Issue 10701012: JSON Schema Compiler: Added event compilation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Tested GetAllPossibleParameterLists better. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "objects", 3 "namespace": "objects",
4 "types": [], 4 "types": [],
5 "functions": [ 5 "functions": [
6 { 6 {
7 "name": "objectParam", 7 "name": "objectParam",
8 "type": "function", 8 "type": "function",
9 "description": "Takes an object.", 9 "description": "Takes an object.",
10 "parameters": [ 10 "parameters": [
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 "properties": { 46 "properties": {
47 "state": { 47 "state": {
48 "type": "string", 48 "type": "string",
49 "enum": ["foo", "bar", "baz"] 49 "enum": ["foo", "bar", "baz"]
50 } 50 }
51 } 51 }
52 } 52 }
53 ] 53 ]
54 } 54 }
55 ] 55 ]
56 },
57 {
58 "name": "returnsTwoObjects",
59 "description": "Return two objects.",
60 "type": "function",
61 "parameters": [
62 {
63 "name": "callback",
64 "type": "function",
65 "parameters": [
66 {
67 "name": "firstInfo",
68 "type": "object",
69 "properties": {
70 "state": {
71 "type": "string",
72 "enum": ["foo", "bar", "baz"]
73 }
74 }
75 },
76 {
77 "name": "secondInfo",
78 "type": "object",
79 "properties": {
80 "state": {
81 "type": "string",
82 "enum": ["spam", "ham", "eggs"]
83 }
84 }
85 }
86 ]
87 }
88 ]
89 }
90 ],
91 "events": [
92 {
93 "name": "onObjectFired",
94 "type": "function",
95 "description": "Fired when an object is ready.",
96 "parameters": [
97 {
98 "name": "someObject",
99 "type": "object",
100 "properties": {
101 "state": {
102 "type": "string",
103 "enum": ["foo", "bar", "baz"]
104 }
105 }
106 }
107 ]
108 },
109 {
110 "name": "onTwoObjectsFired",
111 "type": "function",
112 "description": "Fired when two objects are ready.",
113 "parameters": [
114 {
115 "name": "firstObject",
116 "type": "object",
117 "properties": {
118 "state": {
119 "type": "string",
120 "enum": ["foo", "bar", "baz"]
121 }
122 }
123 },
124 {
125 "name": "secondObject",
126 "type": "object",
127 "properties": {
128 "state": {
129 "type": "string",
130 "enum": ["spam", "ham", "eggs"]
131 }
132 }
133 }
134 ]
56 } 135 }
57 ] 136 ]
58 } 137 }
59 ] 138 ]
60 139
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698