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

Unified Diff: tools/json_schema_compiler/model.py

Issue 10206034: JSON schema compiler can't handle strings as types (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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/model.py
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index 75ae60e439f3676a8ed895fa110e23a610a5f55d..86716a550e58438b759e1f3d2d0cfdcb85e87b5f 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -76,6 +76,8 @@ class Type(object):
self.item_type = Property(self, name + "Element", json['items'],
from_json=True,
from_client=True)
+ elif json.get('type') == 'string':
+ self.type_ = PropertyType.STRING
else:
if not (
'properties' in json or

Powered by Google App Engine
This is Rietveld 408576698