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 |