Expand description
Type-safe API operation builder with compile-time guarantees
This module provides a type-state builder pattern that enforces at compile time that API operations cannot be registered unless both a handler and at least one response are specified.
Re-exports§
pub use error_layer::IntoProblem;pub use error_layer::error_mapping_middleware;pub use error_layer::extract_trace_id;pub use error_layer::map_error_to_problem;pub use openapi_registry::OpenApiInfo;pub use openapi_registry::OpenApiRegistry;pub use openapi_registry::OpenApiRegistryImpl;pub use openapi_registry::ensure_schema;pub use operation_builder::Missing;pub use operation_builder::OperationBuilder;pub use operation_builder::OperationSpec;pub use operation_builder::ParamLocation;pub use operation_builder::ParamSpec;pub use operation_builder::Present;pub use operation_builder::RateLimitSpec;pub use operation_builder::ResponseSpec;pub use operation_builder::state;pub use problem::bad_request;pub use problem::conflict;pub use problem::internal_error;pub use problem::not_found;pub use select::apply_select;pub use select::page_to_projected_json;pub use select::project_json;pub use trace_layer::WithRequestContext;pub use trace_layer::WithTraceContext;
Modules§
- api_dto
- error_
layer - Centralized error mapping for Axum
- odata
- openapi_
registry OpenAPIregistry for schema and operation management- operation_
builder - Type-safe API operation builder with compile-time guarantees
- prelude
- Prelude module that re-exports common API types and utilities for module authors
- problem
- Re-exports and convenience constructors for Problem types
- response
- select
- Field projection support for
$selectODataqueries. - trace_
layer - Trace propagation utilities for Problem responses
Structs§
- Problem
- RFC 9457 Problem Details for HTTP APIs.
- Validation
Error - Collection of validation errors for 422 responses.
Constants§
- APPLICATION_
PROBLEM_ JSON - Content type for Problem Details as per RFC 9457.