summaryrefslogtreecommitdiffstats
path: root/tools/json_schema_compiler
diff options
context:
space:
mode:
authorcduvall@chromium.org <cduvall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-03 18:18:43 +0000
committercduvall@chromium.org <cduvall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-03 18:18:43 +0000
commitc05132972c3845affefe93366ca5763ff01fab5c (patch)
treee3a72ad802a553519349681a5ef0a86ef9a461de /tools/json_schema_compiler
parent206db01ee88a30acd62924e554ca92c9c6d8979b (diff)
downloadchromium_src-c05132972c3845affefe93366ca5763ff01fab5c.zip
chromium_src-c05132972c3845affefe93366ca5763ff01fab5c.tar.gz
chromium_src-c05132972c3845affefe93366ca5763ff01fab5c.tar.bz2
Extension Docs Server: Function Templates
Note: some of the templates are very ugly and hard to read. Particularly, the type.html template. This is because it may be surrounded in a <pre></pre>, which keeps the formatting. This is unfortunate. These templates are used in: https://chromiumcodereview.appspot.com/10688002/ BUG=133772 TEST=none Review URL: https://chromiumcodereview.appspot.com/10679013 Patch from Christopher Hebert <hebert.christopherj@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145334 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/json_schema_compiler')
-rw-r--r--tools/json_schema_compiler/model.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index 1b353ac..10890ed 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -111,6 +111,9 @@ 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.params = []
if len(params) == 0:
return