@inject(task_router=TaskRouter)<EOL>def generate_apiary_doc(task_router):
generator = ApiaryDoc()<EOL>for m in task_router.get_task_packages() + get_method_packages():<EOL><INDENT>m = importlib.import_module(m)<EOL>generator.docmodule(m)<EOL><DEDENT>return generator<EOL>
Generate apiary documentation.

    Create a Apiary generator and add application packages to it.

    :param task_router: task router, injected
    :type task_router: TaskRouter
    :return: apiary generator
    :rtype: ApiaryDoc