validBody<T extends Validatable> method
The JSON object body, decoded and then checked against its constraints.
The one call a create endpoint needs: a body of the wrong shape and a
body that breaks a @Validate both answer 422, and only the second names
the fields.
Implementation
Future<T> validBody<T extends Validatable>(
T Function(Map<String, Object?> json) deserialize,
) =>
extractors.valid(extractors.body<T>(deserialize)).require(this);