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

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

Issue 9491002: json_schema_compiler: any, additionalProperties, functions on types (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add any in arrays to util.h 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
Index: tools/json_schema_compiler/test/functionsOnTypes.json
diff --git a/tools/json_schema_compiler/test/functionsOnTypes.json b/tools/json_schema_compiler/test/functionsOnTypes.json
new file mode 100644
index 0000000000000000000000000000000000000000..e8c822055cbe41d274313054ae544b23850c8814
--- /dev/null
+++ b/tools/json_schema_compiler/test/functionsOnTypes.json
@@ -0,0 +1,74 @@
+[
+ {
+ "namespace": "functionsOnTypes",
+ "types": [
+ {
+ "id": "StorageArea",
+ "type": "object",
+ "functions": [
+ {
+ "name": "get",
+ "type": "function",
+ "description": "Gets one or more items from storage.",
+ "parameters": [
+ {
+ "name": "keys",
+ "choices": [
+ { "type": "string" },
+ {
+ "type": "object",
+ "description": "Storage items to return in the callback, where the values are replaced with those from storage if they exist.",
+ "properties": {},
+ "additionalProperties": { "type": "any" }
+ }
+ ],
+ "description": "A single key to get, list of keys to get, or a dictionary specifying default values (see description of the object). An empty list or object will return an empty result object. Pass in <code>null</code> to get the entire contents of storage.",
+ "optional": true
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "description": "Callback with storage items, or on failure (in which case lastError will be set).",
+ "parameters": [
+ {
+ "name": "items",
+ "type": "object",
+ "properties": {},
+ "additionalProperties": { "type": "any" },
+ "description": "Object with items in their key-value mappings."
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "ChromeSetting",
+ "type": "object",
+ "description": "An interface which allows access to a Chrome browser setting.",
+ "functions": [
+ {
+ "name": "get",
+ "type": "function",
+ "description": "Gets the value of a setting.",
+ "parameters": [
+ {
+ "name": "details",
+ "type": "object",
+ "description": "What setting to consider.",
+ "properties": {
+ "incognito": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether to return the setting that applies to the incognito session (default false)."
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]
« no previous file with comments | « tools/json_schema_compiler/test/arrays_unittest.cc ('k') | tools/json_schema_compiler/test/functions_on_types_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698