Fix doc generation

This commit is contained in:
Julien Duponchelle
2015-02-24 11:38:57 +01:00
parent fd03b36258
commit 67be24a412
134 changed files with 1477 additions and 102 deletions

View File

@ -92,9 +92,10 @@ class Route(object):
def register(func):
route = cls._path
handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.", "")
handler = func.__module__.replace("_handler", "").replace("gns3server.handlers.api.", "")
cls._documentation.setdefault(handler, {})
cls._documentation[handler].setdefault(route, {"methods": []})
cls._documentation[handler].setdefault(route, {"api_version": api_version,
"methods": []})
cls._documentation[handler][route]["methods"].append({
"method": method,