- add sources.
[platform/framework/web/crosswalk.git] / src / tools / json_schema_compiler / test / error_generation.json
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         "id": "ArrayObject",
66         "type": "object",
67         "properties": {
68           "TheArray": {
69             "type": "array",
70             "items": {"type": "string"},
71             "optional": true,
72             "description": "Expecting a list?"
73           }
74         }
75       }
76     ],
77     "functions": [
78       {
79         "name": "testString",
80         "type": "function",
81         "description": "Takes a string. Or not.",
82         "parameters": [
83           {
84             "name": "str",
85             "type": "string",
86             "optional": true
87           }
88         ]
89       },
90       {
91         "name": "testFunction",
92         "type": "function",
93         "description": "Specifies a number of parameters.",
94         "parameters": [
95           {
96             "name": "num",
97             "type": "integer"
98           }
99         ]
100       },
101       {
102         "name": "testTypeInObject",
103         "type": "function",
104         "description": "Takes a TestType.",
105         "parameters": [
106           {
107             "name": "paramObject",
108             "type": "object",
109             "properties": {
110               "testType": {"$ref": "error_generation.TestType", "optional": true},
111               "boolean": {"type": "boolean"}
112             }
113           }
114         ]
115       }
116     ]
117   }
118 ]