Eric
05/12/2023, 2:41 PM@RequestBody @ValidJsonPatch patch: JsonPatch
I've created the validation annotation and constraint validator:
@Constraint(validatedBy = [JsonPatchValidator::class])
annotation class ValidJsonPatch(
val message: String = "",
val groups: Array<KClass<*>> = [],
val payload: Array<KClass<out Payload>> = [],
)
class JsonPatchValidator : ConstraintValidator<ValidJsonPatch, JsonPatch> {
override fun isValid(value: JsonPatch, context: ConstraintValidatorContext): Boolean { ... }
}
But the validator never gets invoked.
I've added _implementation_("org.springframework.boot:spring-boot-starter-validation")
to my dependencies and standard jakarta validation annotations work.
edit: scratch that... standard validation annotations are also not working.Jacob
05/12/2023, 2:58 PMEric
05/12/2023, 3:04 PM