feat(cli): 部分完成 nyahome init 和 check 命令

This commit is contained in:
2026-06-03 23:02:59 +08:00
parent 2b30f0ffe3
commit ee81ccefc5
7 changed files with 427 additions and 142 deletions
+4 -1
View File
@@ -61,7 +61,10 @@ app.add_middleware(
def save_openapi_json(save_path: str | Path) -> None:
from docstring_parser import DocstringStyle
try:
from docstring_parser import DocstringStyle
except ImportError as e:
raise RuntimeError("开发依赖 docstring_parser 不存在,请使用 git clone 方式克隆 NyaHome。") from e
from nyahome.cli.openapi_docstring import enrich_openapi_from_docstrings