google styled doc
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
"""
|
||||
openapi_first.cli
|
||||
========================
|
||||
|
||||
Command-line interface for FastAPI OpenAPI-first scaffolding utilities.
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
This CLI bootstraps OpenAPI-first FastAPI applications from versioned,
|
||||
bundled templates packaged with the library.
|
||||
"""
|
||||
@@ -20,6 +21,10 @@ DEFAULT_TEMPLATE = "health_app"
|
||||
def available_templates() -> list[str]:
|
||||
"""
|
||||
Return a list of available application templates.
|
||||
|
||||
Returns:
|
||||
list[str]:
|
||||
Sorted list of template names found in the internal templates directory.
|
||||
"""
|
||||
root = resources.files("openapi_first.templates")
|
||||
return sorted(
|
||||
@@ -32,6 +37,16 @@ def available_templates() -> list[str]:
|
||||
def copy_template(template: str, target_dir: Path) -> None:
|
||||
"""
|
||||
Copy a bundled OpenAPI-first application template into a directory.
|
||||
|
||||
Args:
|
||||
template (str):
|
||||
Name of the template to copy.
|
||||
target_dir (Path):
|
||||
Filesystem path where the template should be copied.
|
||||
|
||||
Raises:
|
||||
FileNotFoundError:
|
||||
If the requested template does not exist.
|
||||
"""
|
||||
target_dir = target_dir.resolve()
|
||||
target_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user