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

Unified Diff: tools/json_schema_compiler/model.py

Issue 10907151: Extensions Docs Server: Enum values do not show up if enum is a type (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ToString and FromString Created 8 years, 3 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 29c54a08130a3ddc2b54170fec342593abd47229..38a70acd65912dfc39ec0614f81b94f458677a88 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -79,13 +79,13 @@ 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
elif 'enum' in json:
self.enum_values = []
for value in json['enum']:
self.enum_values.append(value)
self.type_ = PropertyType.ENUM
+ elif json.get('type') == 'string':
+ self.type_ = PropertyType.STRING
else:
if not (
'properties' in json or
@@ -95,6 +95,7 @@ class Type(object):
raise ParseException(self, name + " has no properties or functions")
self.type_ = PropertyType.OBJECT
self.name = name
+ self.unix_name = UnixName(self.name)
self.description = json.get('description')
self.from_json = True
self.from_client = True

Powered by Google App Engine
This is Rietveld 408576698