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

Unified Diff: chrome/common/extensions/docs/server2/api_data_source.py

Issue 11823033: Fix two problems with server2's documentation generator: it wasn't showing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bump version Created 7 years, 11 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 | « no previous file | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/api_data_source.py
diff --git a/chrome/common/extensions/docs/server2/api_data_source.py b/chrome/common/extensions/docs/server2/api_data_source.py
index dcb1736a1b690c93cbde3599caec35538e794daa..88267686bd0dcf1f44fe991b6b5167ce92a172ec 100644
--- a/chrome/common/extensions/docs/server2/api_data_source.py
+++ b/chrome/common/extensions/docs/server2/api_data_source.py
@@ -16,7 +16,7 @@ import third_party.json_schema_compiler.idl_parser as idl_parser
# Increment this version when there are changes to the data stored in any of
# the caches used by APIDataSource. This allows the cache to be invalidated
# without having to flush memcache on the production server.
-_VERSION = 8
+_VERSION = 9
def _RemoveNoDocs(item):
if json_parse.IsDict(item):
@@ -167,11 +167,18 @@ class _JSCModel(object):
if v.type_ != model.PropertyType.ADDITIONAL_PROPERTIES]
def _GenerateProperty(self, property_):
+ # Make sure we generate property info for arrays, too.
+ # TODO(kalman): what about choices?
+ if property_.type_ == model.PropertyType.ARRAY:
+ properties = property_.item_type.properties
+ else:
+ properties = property_.properties
+
property_dict = {
'name': property_.simple_name,
'optional': property_.optional,
'description': self._FormatDescription(property_.description),
- 'properties': self._GenerateProperties(property_.properties),
+ 'properties': self._GenerateProperties(properties),
'functions': self._GenerateFunctions(property_.functions),
'parameters': [],
'returns': None,
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698