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

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

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework, add a couple of tests Created 8 years, 10 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
(Empty)
1 [
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": "optionalCallbackParams",
70 "type": "function",
71 "description": "Gives back a string. Or not.",
72 "parameters": [
73 {
74 "name": "callback",
75 "type": "function",
76 "parameters": [
77 {
78 "name": "result",
79 "$ref": "TestType",
80 "description": "True if the extension has the specified permissi ons."
81 }
82 ]
83 }
84 ]
85 },
86 {
87 "name": "getTestType",
88 "type": "function",
89 "description": "Return a TestType.",
90 "parameters": [
91 {
92 "name": "callback",
93 "type": "function",
94 "parameters": [
95 {
96 "name": "result",
97 "$ref": "TestType",
98 "description": "A TestType."
99 }
100 ]
101 }
102 ]
103 }
104 ]
105 }
106 ]
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/json_schema_compiler_tests.gyp ('k') | tools/json_schema_compiler/test/simple_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698