Rebuild link sample

This commit is contained in:
Julien Duponchelle committed 2016-03-11 17:20:09 +01:00
1 parent 8c1560332e
commit 6a19e4d822
125 files changed
+347 -296

No files matched your search

+5 -2
View File
@@ -135,5 +135,8 @@ class Query:
def _example_file_path(self, method, path):
path = re.sub('[^a-z0-9]', '', path)
prefix = self._prefix.replace('/', '')
return "docs/api/examples/{}_{}_{}.txt".format(prefix, method.lower(), path)
if len(self._prefix) > 0:
prefix = self._prefix.replace('/', '')
return "docs/api/examples/{}_{}_{}.txt".format(prefix, method.lower(), path)
else:
return "docs/api/examples/controller_{}_{}.txt".format(method.lower(), path)