fix: tighten binder/app route annotations (FastAPI/ModuleType); sync binder.pyi with signature; refresh MCP docs
This commit is contained in:
@@ -32,28 +32,30 @@ Notes:
|
||||
- Interpret OpenAPI semantics beyond routing metadata.
|
||||
"""
|
||||
|
||||
from types import ModuleType
|
||||
from typing import Any
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.routing import APIRoute
|
||||
|
||||
from .errors import MissingOperationHandler
|
||||
|
||||
|
||||
def bind_routes(
|
||||
app: Any,
|
||||
spec: dict,
|
||||
routes_module: Any,
|
||||
app: FastAPI,
|
||||
spec: dict[str, Any],
|
||||
routes_module: ModuleType,
|
||||
security_deps: dict[str, list[Any]] | None = None,
|
||||
) -> None:
|
||||
"""
|
||||
Bind OpenAPI operations to FastAPI routes.
|
||||
|
||||
Args:
|
||||
app (Any):
|
||||
app (FastAPI):
|
||||
The FastAPI application instance to which routes will be added.
|
||||
spec (dict):
|
||||
spec (dict[str, Any]):
|
||||
Parsed OpenAPI 3.x specification dictionary.
|
||||
routes_module (Any):
|
||||
routes_module (ModuleType):
|
||||
Python module containing handler functions. Each handler's name MUST
|
||||
exactly match an OpenAPI `operationId`.
|
||||
security_deps (dict[str, list[Any]] | None):
|
||||
|
||||
Reference in New Issue
Block a user