Files
2026-04-21 19:00:53 +05:45

22 lines
506 B
Python

import importlib
from .exceptions import ExceptionHandlerRoute
module_path = [
'.auth.views'
]
routers = []
docs = []
for path in module_path:
module = importlib.import_module(path, package = 'app')
if hasattr(module, 'router'):
assert(type(module.router.route_class == ExceptionHandlerRoute))
routers.append(module.router)
if hasattr(module, 'docs'):
tag = module.router.tags[0]
docs.append({"name" : tag, "description" : module.docs})