Expand description
Modules§
- db
sea-orm - Contains a middleware that automatically creates and manages a
sea_orm::DatabaseTransactionfor each incoming request. The transaction is automaticallycommit()ed if the endpoint returns a successful response orrollback()ed in case of an error. - panic_
handler - Contains a middlware that automatically responds with an internal server error whenever the current thread is panicking.
- patch_
value - Contains the
PatchValueenum that can be used inPATCHendpoints to distinguish between values that should be updated and those that should remain unchanged. - responses
- 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§
- add_
response_ schemas - Implement
MetaResponsesExtfor a type to add additional response schemas to an endpoint by using theResponsetype. - custom_
auth - Define a custom authorization dependency based on
poem_openapi::auth::Bearerthat uses a custom function to perform authorization. - response
- Construct an
ApiResponseenum with some helper functions to easily create both success and error responses. - static_
string - Construct an OpenApi type that always evaluates to a static string that is set at compile time.