Index: tools/json_schema_compiler/test/array.json |
diff --git a/tools/json_schema_compiler/test/array.json b/tools/json_schema_compiler/test/array.json |
new file mode 100644 |
index 0000000000000000000000000000000000000000..64dbdd44ff95d9ce39d0c95e20ffa02af78da646 |
--- /dev/null |
+++ b/tools/json_schema_compiler/test/array.json |
@@ -0,0 +1,120 @@ |
+[ |
+ { |
+ "namespace": "array", |
+ "types": [ |
+ { |
+ "id": "BasicArrayType", |
+ "type": "object", |
+ "properties": { |
+ "strings": { |
+ "type": "array", |
+ "items": {"type": "string"} |
+ }, |
+ "booleans": { |
+ "type": "array", |
+ "items": {"type": "boolean"} |
+ }, |
+ "numbers": { |
+ "type": "array", |
+ "items": {"type": "number"} |
+ }, |
+ "integers": { |
+ "type": "array", |
+ "items": {"type": "integer"} |
+ } |
+ } |
+ }, |
+ { |
+ "id": "Item", |
+ "type": "object", |
+ "properties": { |
+ "val": { |
+ "type": "integer" |
+ } |
+ } |
+ }, |
+ { |
+ "id": "RefArrayType", |
+ "type": "object", |
+ "properties": { |
+ "refs": { |
+ "type": "array", |
+ "items": { "$ref": "Item" } |
+ } |
+ } |
+ } |
+ ], |
+ "functions": [ |
+ { |
+ "name": "integerArray", |
+ "type": "function", |
+ "description": "Increments the given integer.", |
+ "parameters": [ |
+ { |
+ "name": "nums", |
+ "type": "array", |
+ "items": {"type": "integer"} |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "parameters": [] |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "refArray", |
+ "type": "function", |
+ "description": "Takes some Items.", |
+ "parameters": [ |
+ { |
+ "name": "refs", |
+ "type": "array", |
+ "items": {"$ref": "Item"} |
+ }, |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "parameters": [] |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "returnIntegerArray", |
+ "type": "function", |
+ "description": "Returns some integers.", |
+ "parameters": [ |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "parameters": [ |
+ { |
+ "name": "integers", |
+ "type": "array", |
+ "items": {"type": "integer"} |
+ } |
+ ] |
+ } |
+ ] |
+ }, |
+ { |
+ "name": "returnRefArray", |
+ "type": "function", |
+ "description": "Returns some Items.", |
+ "parameters": [ |
+ { |
+ "name": "callback", |
+ "type": "function", |
+ "parameters": [ |
+ { |
+ "name": "refs", |
+ "type": "array", |
+ "items": {"$ref": "Item"} |
+ } |
+ ] |
+ } |
+ ] |
+ } |
+ ] |
+ } |
+] |