Typed failure management with multiple errors per endpoint

With this MR, it now becomes possible to declare failures as part of endpoints:

val createUser by post()
    .response<List<UserDto>>()
    .failure<NotAllowed>(HttpStatusCode.Forbidden)
    .failure<InvalidUsername>(HttpStatusCode.UnprocessableEntity)

Multiple failures can be declared on a single endpoint.

Thanks a lot to @LelouBil who helped prototype and brainstorm this (!51).

Merge request reports

Loading