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

Side by Side Diff: tools/json_schema_compiler/test/choices.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": "choices",
4 "types": [],
5 "functions": [
6 {
7 "name": "takesIntegers",
8 "type": "function",
9 "description": "Takes one or more integers.",
10 "parameters": [
11 {
12 "name": "nums",
13 "choices": [
14 {"type": "array", "items": {"type": "integer", "minimum": 0}},
15 {"type": "integer"}
16 ]
17 },
18 {
19 "name": "callback",
20 "type": "function",
21 "parameters": []
22 }
23 ]
24 },
25 {
26 "name": "takesIntegersOptional",
27 "type": "function",
28 "description": "Takes one or more integers.",
29 "parameters": [
30 {
31 "name": "nums",
32 "choices": [
33 {"type": "array", "items": {"type": "integer", "minimum": 0}},
34 {"type": "integer"}
35 ],
36 "optional": true
37 },
38 {
39 "name": "callback",
40 "type": "function",
41 "parameters": []
42 }
43 ]
44 },
45 {
46 "name": "objectWithChoices",
47 "type": "function",
48 "description": "Takes an object with one or more strings and optional in teger(s).",
49 "parameters": [
50 {
51 "type": "object",
52 "name": "stringInfo",
53 "properties": {
54 "strings": {
55 "description": "One or more tab indices to highlight.",
56 "choices": [
57 {"type": "array", "items": {"type": "string", "minimum": 0}},
58 {"type": "string"}
59 ]
60 },
61 "integers": {
62 "description": "One or more tab indices to highlight.",
63 "choices": [
64 {"type": "array", "items": {"type": "integer", "minimum": 0}} ,
65 {"type": "integer"}
66 ],
67 "optional": true
68 }
69 }
70 },
71 {
72 "name": "callback",
73 "type": "function",
74 "parameters": []
75 }
76 ]
77 },
78 {
79 "name": "returnChoices",
80 "type": "function",
81 "description": "Gives back a string. Or not.",
82 "parameters": [
83 {
84 "name": "callback",
85 "type": "function",
86 "parameters": [
87 {
88 "name": "result",
89 "choices": [
90 {"type": "array", "items": {"type": "integer", "minimum": 0}} ,
91 {"type": "integer"}
92 ],
93 "description": "Some integers."
94 }
95 ]
96 }
97 ]
98 }
99 ]
100 }
101 ]
102
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/array_unittest.cc ('k') | tools/json_schema_compiler/test/choices_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698