feat: add type stubs for cli, codegen, and security modules
This commit is contained in:
@@ -5,5 +5,15 @@ from . import codegen as codegen
|
||||
from . import codegen_routes as codegen_routes
|
||||
from . import errors as errors
|
||||
from . import loader as loader
|
||||
from . import security as security
|
||||
|
||||
__all__ = ["app", "binder", "loader", "client", "errors", "codegen", "codegen_routes"]
|
||||
__all__ = [
|
||||
"app",
|
||||
"binder",
|
||||
"loader",
|
||||
"client",
|
||||
"errors",
|
||||
"codegen",
|
||||
"codegen_routes",
|
||||
"security",
|
||||
]
|
||||
|
||||
7
openapi_first/cli.pyi
Normal file
7
openapi_first/cli.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from pathlib import Path
|
||||
|
||||
DEFAULT_TEMPLATE: str
|
||||
|
||||
def available_templates() -> list[str]: ...
|
||||
def copy_template(template: str, target_dir: Path) -> None: ...
|
||||
def main() -> None: ...
|
||||
11
openapi_first/codegen.pyi
Normal file
11
openapi_first/codegen.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from pathlib import Path
|
||||
|
||||
from .codegen_routes import generate_routes
|
||||
|
||||
def generate_models(
|
||||
spec_path: Path,
|
||||
output_path: Path,
|
||||
pydantic_version: int = ...,
|
||||
) -> None: ...
|
||||
|
||||
__all__ = ["generate_models", "generate_routes"]
|
||||
9
openapi_first/codegen_routes.pyi
Normal file
9
openapi_first/codegen_routes.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from pathlib import Path
|
||||
|
||||
def generate_routes(
|
||||
spec_path: Path,
|
||||
output_dir: Path,
|
||||
*,
|
||||
use_models: bool = ...,
|
||||
models_module: str = ...,
|
||||
) -> list[Path]: ...
|
||||
7
openapi_first/security.pyi
Normal file
7
openapi_first/security.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
from typing import Any
|
||||
|
||||
def parse_security_schemes(spec: dict[str, Any]) -> dict[str, dict[str, Any]]: ...
|
||||
def make_security_dependencies(
|
||||
spec: dict[str, Any],
|
||||
security_schemes: dict[str, dict[str, Any]],
|
||||
) -> dict[str, list[Any]]: ...
|
||||
Reference in New Issue
Block a user