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

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

Issue 22228002: Add optional schema compiler error messages (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Templates. Created 7 years, 4 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": "error_generation",
4 "description": "Generates ALL the errors.",
5 "compiler_options": {
6 "generate_error_messages": true
7 },
8 "types": [
9 {
10 "id": "TestType",
11 "type": "object",
12 "properties": {
13 "string": {
14 "type": "string",
15 "description": "Some string."
16 }
17 }
18 },
19 {
20 "id": "ChoiceType",
21 "type": "object",
22 "properties": {
23 "integers": {
24 "choices": [
25 {"type": "array", "items": {"type": "integer", "minimum": 0}},
26 {"type": "integer"}
27 ]
28 }
29 }
30 },
31 {
32 "id": "ObjectType",
33 "type": "object",
34 "properties": {
35 "otherType": {
36 "$ref": "error_generation.TestType",
37 "optional": true
38 }
39 }
40 },
41 {
42 "id": "Enumeration",
43 "type": "string",
44 "enum": ["one", "two", "three"]
45 },
46 {
47 "id": "HasEnumeration",
48 "type": "object",
49 "properties": {
50 "enumeration": {
51 "$ref": "Enumeration"
52 }
53 }
54 },
55 {
56 "id": "BinaryData",
57 "type": "object",
58 "properties": {
59 "data": {
60 "type" : "binary"
61 }
62 }
63 }
64 ],
65 "functions": [
66 {
67 "name": "testString",
68 "type": "function",
69 "description": "Takes a string. Or not.",
70 "parameters": [
71 {
72 "name": "str",
73 "type": "string",
74 "optional": true
75 }
76 ]
77 },
78 {
79 "name": "testFunction",
80 "type": "function",
81 "description": "Specifies a number of parameters.",
82 "parameters": [
83 {
84 "name": "num",
85 "type": "integer"
86 }
87 ]
88 },
89 {
90 "name": "testTypeInObject",
91 "type": "function",
92 "description": "Takes a TestType.",
93 "parameters": [
94 {
95 "name": "paramObject",
96 "type": "object",
97 "properties": {
98 "testType": {"$ref": "error_generation.TestType", "optional": true },
99 "boolean": {"type": "boolean"}
100 }
101 }
102 ]
103 }
104 ]
105 }
106 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698