Errors
openapi_first.errors
Exceptions for OpenAPI-first FastAPI applications.
Summary
This module defines a small hierarchy of explicit, intention-revealing exceptions used to signal contract violations between an OpenAPI specification and its Python implementation.
Notes
Design Principles:
1 2 3 4 | |
These errors should normally cause immediate application failure.
Classes
MissingOperationHandler
Bases: OpenAPIFirstError
Raised when an OpenAPI operation cannot be resolved to a handler.
Notes
Scenarios:
1 2 | |
Guarantees:
1 | |
Initialize the error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path |
str
|
The HTTP path declared in the OpenAPI specification. |
required |
method |
str
|
The HTTP method (as declared in the OpenAPI spec). |
required |
operation_id |
str
|
The operationId declared in the OpenAPI spec, if present. |
None
|
Functions
OpenAPIFirstError
Bases: Exception
Base exception for all OpenAPI-first enforcement errors.
Notes
Responsibilities:
1 2 | |