Index: tools/json_schema_compiler/model.py |
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py |
index d6b6efc1a12f3519777d08b4995fa43d27e8c8ea..d49c18f2145560b55947dc5b29fd1f7d70c3c818 100644 |
--- a/tools/json_schema_compiler/model.py |
+++ b/tools/json_schema_compiler/model.py |
@@ -39,6 +39,7 @@ class Namespace(object): |
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 @@ class Namespace(object): |
""" |
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) |