Added
problem-details-ktor-validation — integration with Ktor's RequestValidation plugin.
requestValidation(type) maps a RequestValidationException to a Problem carrying an
errors[] array, the multi-field pattern RFC 9457 itself recommends. Entries use the RFC's own
member names, detail and pointer.
invalidField/invalidFields attach a JSON Pointer (RFC 6901) to a failure reason from inside
validate<T> { }. A reason written any other way degrades to a detail-only entry.
jsonPointer(Customer::age) and jsonPointer<Customer>("profile", "color") derive that pointer
from the body type's serial descriptor, so a renamed member stops compiling or throws instead of
pointing at something that is gone. invalidField also takes a property reference directly.
- A member renamed with
@SerialName must be named by its serial name: mapping a Kotlin property
to a serial name needs kotlin-reflect, which this library does not use.
decodeValidationReason is public, for a mapping that needs an errors[] shape
requestValidation does not produce.
problem-details-core — Json.encodeToProblemValue(value) encodes any @Serializable value
to a standalone ProblemValue, for a value that is not a whole extension member — one element of a
ProblemArray, for instance.
Docs
- The README now leads with the document the library produces, groups its feature list by task, and
picks artifacts from an "if you want to… add…" table.
API reference · Maven Central