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

Unified Diff: tools/json_schema_compiler/model.py

Issue 17568003: DOCS ONLY. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1541/src/
Patch Set: Created 7 years, 6 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
===================================================================
--- tools/json_schema_compiler/model.py (revision 208118)
+++ tools/json_schema_compiler/model.py (working copy)
@@ -39,6 +39,7 @@
Properties:
- |name| the name of the namespace
+ - |description| the description of the namespace
- |unix_name| the unix_name of the namespace
- |source_file| the file that contained the namespace definition
- |source_file_dir| the directory component of |source_file|
@@ -54,6 +55,10 @@
"""
def __init__(self, json, source_file, include_compiler_options=False):
self.name = json['namespace']
+ if 'description' not in json:
+ raise ValueError('%s must have a "description" field. This will appear '
+ 'on the API summary page.' % self.name)
+ self.description = json.get('description', None)
self.unix_name = UnixName(self.name)
self.source_file = source_file
self.source_file_dir, self.source_file_filename = os.path.split(source_file)
« no previous file with comments | « tools/json_schema_compiler/json_schema_test.py ('k') | tools/json_schema_compiler/test/additional_properties.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698