Expand description
Modules§
- db
sea-orm
Contains a middleware that automatically creates and manages asea_orm::DatabaseTransaction
for each incoming request. The transaction is automaticallycommit()
ed if the endpoint returns a successful response orrollback()
ed in case of an error. - Contains a middlware that automatically responds with an internal server error whenever the current thread is panicking.
- Contains the
PatchValue
enum that can be used inPATCH
endpoints to distinguish between values that should be updated and those that should remain unchanged. - Improve endpoint documentation by adding response schemas to the OpenAPI spec that might be returned by an authorization dependency, a bad request handler or other middlewares.
- shield_mw
shield
Contains a middleware that prevents endpoint handlers from being canceled if the connection is closed.
Macros§
- Implement
MetaResponsesExt
for a type to add additional response schemas to an endpoint by using theResponse
type. - Define a custom authorization dependency based on
poem_openapi::auth::Bearer
that uses a custom function to perform authorization. - Construct an
ApiResponse
enum with some helper functions to easily create both success and error responses. - Construct an OpenApi type that always evaluates to a static string that is set at compile time.