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

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

Issue 48263002: list apis by channel info, e.g. dev, stable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: done Created 7 years, 1 month 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: chrome/common/extensions/docs/server2/api_models.py
diff --git a/chrome/common/extensions/docs/server2/api_models.py b/chrome/common/extensions/docs/server2/api_models.py
index b8a1b1fc36cd10262855f27e579fb75c631728dc..8e263d3dd72e751e4c4e1b5ac26a57e0974e6387 100644
--- a/chrome/common/extensions/docs/server2/api_models.py
+++ b/chrome/common/extensions/docs/server2/api_models.py
@@ -19,6 +19,7 @@ def _CreateAPIModel(path, data):
schema = ProcessSchema(path, data)
if os.path.splitext(path)[1] == '.json':
schema = schema[0]
+ if not schema: return None
return Namespace(schema, schema['namespace'])
@@ -72,3 +73,7 @@ class APIModels(object):
# Propagate the first FileNotFoundError if neither were found.
futures[0].Get()
return Future(delegate=Gettable(resolve))
+
+ def IterModels(self):
+ return dict((name, self.GetModel(name))
+ for name in self.GetNames()).iteritems()
« no previous file with comments | « chrome/common/extensions/docs/server2/api_list_data_source_test.py ('k') | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698