Index: tools/json_schema_compiler/model.py |
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py |
index 828481f2725c7724238a5598127a303298054697..a35d15e4fa6e40944e29838df835b17a496c7ce1 100644 |
--- a/tools/json_schema_compiler/model.py |
+++ b/tools/json_schema_compiler/model.py |
@@ -114,12 +114,15 @@ class Function(object): |
- |description| a description of the function (if provided) |
- |callback| the callback parameter to the function. There should be exactly |
one |
+ - |optional| whether the Function is "optional"; this only makes sense to be |
+ present when the Function is representing a callback property. |
""" |
def __init__(self, parent, json, from_json=False, from_client=False): |
self.name = json['name'] |
self.params = [] |
self.description = json.get('description') |
self.callback = None |
+ self.optional = json.get('optional', False) |
self.parent = parent |
self.nocompile = json.get('nocompile') |
for param in json.get('parameters', []): |