Package-level declarations

Types

Link copied to clipboard

A config for Akkurate plugin.

Link copied to clipboard
@Serializable
class ProblemDetailsMessage(val status: Int, val fields: Set<@Serializable(with = ConstraintViolationSerializer::class) ConstraintViolation>)

Properties

Link copied to clipboard
val Akkurate: ApplicationPlugin<AkkurateConfig>

A plugin that validates received request bodies.

Functions

Link copied to clipboard
inline fun <ValueType : Any> RequestValidationConfig.registerValidator(validator: Validator.Runner<ValueType>)
inline fun <ValueType : Any> RequestValidationConfig.registerValidator(validator: Validator.SuspendableRunner<ValueType>)

Registers a new validator, which will be executed for each received request body.

inline fun <ContextType, ValueType : Any> RequestValidationConfig.registerValidator(validator: Validator.Runner.WithContext<ContextType, ValueType>, noinline contextProvider: suspend () -> ContextType)
inline fun <ContextType, ValueType : Any> RequestValidationConfig.registerValidator(validator: Validator.SuspendableRunner.WithContext<ContextType, ValueType>, noinline contextProvider: suspend () -> ContextType)

Registers a new validator, which will be executed for each received request body. The contextProvider is called on each execution, then its result is feed to the validator.