Reads network quality provided by the NQE and compares it
[chromium-blink-merge.git] / tools / json_schema_compiler / test / error_generation.json
blobf90ef6ee97d12c45abcdac36b8348557cc7210f8
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": "OptionalTestType",
21         "type": "object",
22         "properties": {
23           "string": {
24             "type": "string",
25             "description": "Some string.",
26             "optional": true
27           }
28         }
29       },
30       {
31         "id": "ChoiceType",
32         "type": "object",
33         "properties": {
34           "integers": {
35             "choices": [
36                {"type": "array", "items": {"type": "integer", "minimum": 0}},
37                {"type": "integer"}
38             ]
39           }
40         }
41       },
42       {
43         "id": "OptionalChoiceType",
44         "type": "object",
45         "properties": {
46           "integers": {
47             "choices": [
48                {"type": "array", "items": {"type": "integer", "minimum": 0}},
49                {"type": "integer"}
50             ],
51             "optional": true
52           }
53         }
54       },
55       {
56         "id": "ObjectType",
57         "type": "object",
58         "properties": {
59           "otherType": {
60             "$ref": "error_generation.TestType",
61             "optional": true
62           }
63         }
64       },
65       {
66         "id": "Enumeration",
67         "type": "string",
68         "enum": ["one", "two", "three"]
69       },
70       {
71         "id": "HasEnumeration",
72         "type": "object",
73         "properties": {
74           "enumeration": {
75             "$ref": "Enumeration"
76           }
77         }
78       },
79       {
80         "id": "BinaryData",
81         "type": "object",
82         "properties": {
83           "data": {
84             "type" : "binary"
85           }
86         }
87       },
88       {
89         "id": "OptionalBinaryData",
90         "type": "object",
91         "properties": {
92           "data": {
93             "type" : "binary",
94             "optional": true
95           }
96         }
97       },
98       {
99         "id": "ArrayObject",
100         "type": "object",
101         "properties": {
102           "TheArray": {
103             "type": "array",
104             "items": {"type": "string"},
105             "optional": true,
106             "description": "Expecting a list?"
107           }
108         }
109       }
110     ],
111     "functions": [
112       {
113         "name": "testString",
114         "type": "function",
115         "description": "Takes a string. Or not.",
116         "parameters": [
117           {
118             "name": "str",
119             "type": "string",
120             "optional": true
121           }
122         ]
123       },
124       {
125         "name": "testFunction",
126         "type": "function",
127         "description": "Specifies a number of parameters.",
128         "parameters": [
129           {
130             "name": "num",
131             "type": "integer"
132           }
133         ]
134       },
135       {
136         "name": "testTypeInObject",
137         "type": "function",
138         "description": "Takes a TestType.",
139         "parameters": [
140           {
141             "name": "paramObject",
142             "type": "object",
143             "properties": {
144               "testType": {"$ref": "error_generation.TestType", "optional": true},
145               "boolean": {"type": "boolean"}
146             }
147           }
148         ]
149       }
150     ]
151   }