Binder
openapi_first.binder
Summary
OpenAPI-driven route binding for FastAPI.
This module is responsible for translating an OpenAPI 3.x specification
into concrete FastAPI routes. It enforces a strict one-to-one mapping
between OpenAPI operations and Python handler functions using operationId.
Notes
Core Responsibility:
1 2 3 4 | |
Design Constraints:
1 2 3 4 5 | |
Constraints:
1 2 3 4 5 | |
Classes
Functions
bind_routes
Bind OpenAPI operations to FastAPI routes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
app |
FastAPI
|
The FastAPI application instance to which routes will be added. |
required |
spec |
dict
|
Parsed OpenAPI 3.x specification dictionary. |
required |
routes_module |
module
|
Python module containing handler functions. Each handler's name MUST
exactly match an OpenAPI |
required |
Raises:
| Type | Description |
|---|---|
MissingOperationHandler
|
If an |
Notes
Responsibilities:
1 2 3 | |
Guarantees:
1 2 3 | |