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

Unified Diff: tools/json_schema_compiler/compiler.py

Issue 10700039: Update the JSON Schema Compiler to take dependencies of the form type:name. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sync with trunk Created 8 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/compiler.py
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
index 0813ee55a9ba43e48029c7ff091a8b0c47f08e4e..ae9237336f41af191a39fe1dbe87791ee3e16c09 100755
--- a/tools/json_schema_compiler/compiler.py
+++ b/tools/json_schema_compiler/compiler.py
@@ -57,6 +57,13 @@ def handle_single_schema(filename, dest_dir, root, root_namespace):
# Load type dependencies into the model.
# TODO(miket): do we need this in IDL?
for referenced_schema in referenced_schemas:
+ split_schema = referenced_schema.split(':', 1)
+ if len(split_schema) > 1:
+ if split_schema[0] != 'api':
+ continue
+ else:
+ referenced_schema = split_schema[1]
+
referenced_schema_path = os.path.join(
os.path.dirname(schema), referenced_schema + '.json')
referenced_api_defs = json_schema.Load(referenced_schema_path)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698