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

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

Issue 11195058: Extensions Docs Server: Show parameters of functions that are properties of an object (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add return types Created 8 years, 2 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/test_data/test_json/expected_test_file.json » ('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 36d378073149634dc9430ea31df9b4021d36cc78..271b7a27315df7ea8ea8cca8079054a1dcfdce6f 100644
--- a/chrome/common/extensions/docs/server2/api_data_source.py
+++ b/chrome/common/extensions/docs/server2/api_data_source.py
@@ -17,7 +17,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 = 0
+_VERSION = 1
def _RemoveNoDocs(item):
if type(item) == dict:
@@ -180,9 +180,15 @@ class _JscModel(object):
'optional': property_.optional,
'description': self._FormatDescription(property_.description),
'properties': self._GenerateProperties(property_.properties),
+ 'parameters': [],
'functions': self._GenerateFunctions(property_.functions),
+ 'returns': None,
'id': _CreateId(property_, 'property')
}
+ for param in property_.params:
+ property_dict['parameters'].append(self._GenerateProperty(param))
+ if property_.returns:
+ property_dict['returns'] = self._GenerateProperty(property_.returns)
if (property_.parent is not None and
not isinstance(property_.parent, model.Namespace)):
property_dict['parent_name'] = property_.parent.simple_name
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/test_data/test_json/expected_test_file.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698