Index: tools/json_schema_compiler/test/error_generation.json |
diff --git a/tools/json_schema_compiler/test/error_generation.json b/tools/json_schema_compiler/test/error_generation.json |
new file mode 100644 |
index 0000000000000000000000000000000000000000..884e26f2521038b04e340317d5897443091a5e1f |
--- /dev/null |
+++ b/tools/json_schema_compiler/test/error_generation.json |
@@ -0,0 +1,106 @@ |
+[ |
+ { |
+ "namespace": "error_generation", |
+ "description": "Generates ALL the errors.", |
+ "compiler_options": { |
+ "generate_error_messages": true |
+ }, |
+ "types": [ |
+ { |
+ "id": "TestType", |
+ "type": "object", |
+ "properties": { |
+ "string": { |
+ "type": "string", |
+ "description": "Some string." |
+ } |
+ } |
+ }, |
+ { |
+ "id": "ChoiceType", |
+ "type": "object", |
+ "properties": { |
+ "integers": { |
+ "choices": [ |
+ {"type": "array", "items": {"type": "integer", "minimum": 0}}, |
+ {"type": "integer"} |
+ ] |
+ } |
+ } |
+ }, |
+ { |
+ "id": "ObjectType", |
+ "type": "object", |
+ "properties": { |
+ "otherType": { |
+ "$ref": "error_generation.TestType", |
+ "optional": true |
+ } |
+ } |
+ }, |
+ { |
+ "id": "Enumeration", |
+ "type": "string", |
+ "enum": ["one", "two", "three"] |
+ }, |
+ { |
+ "id": "HasEnumeration", |
+ "type": "object", |
+ "properties": { |
+ "enumeration": { |
+ "$ref": "Enumeration" |
+ } |
+ } |
+ }, |
+ { |
+ "id": "BinaryData", |
+ "type": "object", |
+ "properties": { |
+ "data": { |
+ "type" : "binary" |
+ } |
+ } |
+ } |
+ ], |
+ "functions": [ |
+ { |
+ "name": "testString", |
+ "type": "function", |
+ "description": "Takes a string. Or not.", |
+ "parameters": [ |
+ { |
+ "name": "str", |
+ "type": "string", |
+ "optional": true |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "testFunction", |
+ "type": "function", |
+ "description": "Specifies a number of parameters.", |
+ "parameters": [ |
+ { |
+ "name": "num", |
+ "type": "integer" |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "testTypeInObject", |
+ "type": "function", |
+ "description": "Takes a TestType.", |
+ "parameters": [ |
+ { |
+ "name": "paramObject", |
+ "type": "object", |
+ "properties": { |
+ "testType": {"$ref": "error_generation.TestType", "optional": true}, |
+ "boolean": {"type": "boolean"} |
+ } |
+ } |
+ ] |
+ } |
+ ] |
+ } |
+] |