Browse Source

hotfix for generate doc

Bastien Sevajol 6 years ago
parent
commit
76099f5b4f
2 changed files with 3 additions and 3 deletions
  1. 1 1
      hapic/context.py
  2. 2 2
      hapic/hapic.py

+ 1 - 1
hapic/context.py View File

@@ -76,6 +76,6 @@ class BottleContext(ContextInterface):
76 76
             status=int(http_code),
77 77
         )
78 78
 
79
-    # FIXME: Pas generique
79
+    # FIXME: Pas generique, marche pas en plus :'(
80 80
     def get_app(self):
81 81
         return bottle.default_app()

+ 2 - 2
hapic/hapic.py View File

@@ -259,9 +259,9 @@ class Hapic(object):
259 259
             return decoration.get_wrapper(func)
260 260
         return decorator
261 261
 
262
-    def generate_doc(self):
262
+    def generate_doc(self, app):  # FIXME: j'ai du tricher avec app
263 263
         # FIXME @Damien bottle specific code !
264 264
         # rendre ca generique
265
-        app = self._context.get_app()
265
+        app = app or self._context.get_app()
266 266
         doc_generator = DocGenerator()
267 267
         return doc_generator.get_doc(self._controllers, app)