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

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: cl upload problems fixed? 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
« no previous file with comments | « chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..63973d43405e939a1416c0b51d339807005d8a16 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,7 @@ class Property(object):
self._unix_name = UnixName(self.name)
self._unix_name_used = False
self.optional = json.get('optional', False)
+ self.functions = []
self.has_value = False
self.description = json.get('description')
self.parent = parent
« no previous file with comments | « chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698