| Index: tools/json_schema_compiler/test/simple_api.json
|
| diff --git a/tools/json_schema_compiler/test/simple_api.json b/tools/json_schema_compiler/test/simple_api.json
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b107fabc776ea1f0349f9496a7922207d8fcd40b
|
| --- /dev/null
|
| +++ b/tools/json_schema_compiler/test/simple_api.json
|
| @@ -0,0 +1,106 @@
|
| +[
|
| + {
|
| + "namespace": "simple_api",
|
| + "types": [
|
| + {
|
| + "id": "TestType",
|
| + "type": "object",
|
| + "properties": {
|
| + "string": {
|
| + "type": "string",
|
| + "description": "Some string."
|
| + },
|
| + "boolean": {
|
| + "type": "boolean",
|
| + "description": "Some boolean."
|
| + },
|
| + "number": {
|
| + "type": "number",
|
| + "description": "Some double."
|
| + },
|
| + "integer": {
|
| + "type": "integer",
|
| + "description": "Some integer."
|
| + }
|
| + }
|
| + }
|
| + ],
|
| + "functions": [
|
| + {
|
| + "name": "incrementInteger",
|
| + "type": "function",
|
| + "description": "Increments the given integer.",
|
| + "parameters": [
|
| + {
|
| + "name": "num",
|
| + "type": "integer"
|
| + },
|
| + {
|
| + "name": "callback",
|
| + "type": "function",
|
| + "parameters": [
|
| + {
|
| + "name": "result",
|
| + "type": "integer",
|
| + "description": "The incremented value."
|
| + }
|
| + ]
|
| + }
|
| + ]
|
| + },
|
| + {
|
| + "name": "optionalString",
|
| + "type": "function",
|
| + "description": "Takes a string. Or not.",
|
| + "parameters": [
|
| + {
|
| + "name": "str",
|
| + "type": "string",
|
| + "optional": true
|
| + },
|
| + {
|
| + "name": "callback",
|
| + "type": "function",
|
| + "parameters": []
|
| + }
|
| + ]
|
| + },
|
| + {
|
| + "name": "optionalCallbackParams",
|
| + "type": "function",
|
| + "description": "Gives back a string. Or not.",
|
| + "parameters": [
|
| + {
|
| + "name": "callback",
|
| + "type": "function",
|
| + "parameters": [
|
| + {
|
| + "name": "result",
|
| + "$ref": "TestType",
|
| + "description": "True if the extension has the specified permissions."
|
| + }
|
| + ]
|
| + }
|
| + ]
|
| + },
|
| + {
|
| + "name": "getTestType",
|
| + "type": "function",
|
| + "description": "Return a TestType.",
|
| + "parameters": [
|
| + {
|
| + "name": "callback",
|
| + "type": "function",
|
| + "parameters": [
|
| + {
|
| + "name": "result",
|
| + "$ref": "TestType",
|
| + "description": "A TestType."
|
| + }
|
| + ]
|
| + }
|
| + ]
|
| + }
|
| + ]
|
| + }
|
| +]
|
|
|