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

Unified Diff: tools/json_schema_compiler/model.py

Issue 10689117: Extensions Docs Server: Support APIs with properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Storage API looking good Created 8 years, 5 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 10890ed6711b92149a250e02456f1788fc57abb3..5a608376af9876ef2b12c25ae4d01e1a75349938 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -111,9 +111,8 @@ class Callback(object):
def __init__(self, parent, json):
params = json['parameters']
self.parent = parent
- self.optional = False
- if 'optional' in json:
- self.optional = json['optional'] == True
+ self.description = json.get('description')
+ self.optional = json.get('optional', False)
self.params = []
if len(params) == 0:
return
@@ -184,6 +183,8 @@ class Property(object):
self._unix_name = UnixName(self.name)
self._unix_name_used = False
self.optional = json.get('optional', False)
+ self.value = json.get('value')
not at google - send to devlin 2012/07/09 11:01:20 We're already doing this below :)
cduvall 2012/07/09 17:50:40 Done.
+ self.functions = []
self.has_value = False
self.description = json.get('description')
self.parent = parent

Powered by Google App Engine
This is Rietveld 408576698