JakartaCommandValidator

The Jakarta Bean Validation adapter of CommandValidator: the command body's constraints, checked by validator, become the Violations of wow.command.invalid (400).

A violation's path is the property path (items[0].quantity, empty for the body itself), its code the constraint annotation's name on the wire (not-blank, min), its message the interpolated one.

jakarta.validation-api is a compile-only dependency of this module: the host constructs this validator only when the application provides a Validator (a Bean Validation provider on its classpath).

Constructors

Link copied to clipboard
constructor(validator: Validator)

Functions

Link copied to clipboard
open override fun validate(type: CommandType, body: Any): List<Violation>