Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: tools/json_schema_compiler/test/array.json

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework, add a couple of tests Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/json_schema_compiler/model.py ('k') | tools/json_schema_compiler/test/array_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"}
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
« no previous file with comments | « tools/json_schema_compiler/model.py ('k') | tools/json_schema_compiler/test/array_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698