Skip to main content

Module api

Module api 

Source
Expand description

Type-safe API operation builder with compile-time guarantees

This gear 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 canonical_error_layer::canonical_error_middleware;
pub use error_layer::IntoCanonical;
pub use error_layer::error_mapping_middleware;
pub use error_layer::extract_trace_id;
pub use error_layer::map_error_to_canonical;
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 select::apply_select;
pub use select::page_to_projected_json;
pub use select::project_json;

Modules§

api_dto
canonical_error_layer
Canonical error middleware (DESIGN.md §3.2 / §3.6 / §3.7).
canonical_prelude
Prelude that re-exports the canonical error types and common API utilities.
error_layer
Centralized error mapping for Axum
odata
openapi_registry
OpenAPI registry for schema and operation management
operation_builder
Type-safe API operation builder with compile-time guarantees
response
select
Field projection support for $select OData queries.