Requirekt provides idiomatic preconditions for spr...
# spring
a
Requirekt provides idiomatic preconditions for spring boot. K🎉 The idiomaticity and power of kotlins 
require
 for spring boot rest API's. 👌 v1.1.0 now supports custom error responses! https://github.com/nextbss/requirekt
t
please, don’t get this the wrong, I hope I don’t sound rude, but what is your goal here? from the examples, what you want to do seems to me to be validation, why creating a new library rather than using what already exists? java provides
javax.validation
specification and
hibernate-validator
implements them quite nicely, especially in an api context since the path of the violating field can easily be described. and you also get all the errors in one call the other example you provide on authorization is probably even less realistic, authorization is not a prerequisite but a complex flow. just think how to handle password base, flow base, sso, oauth, openid and all stuff that spring security already does with
require
seems a bit overwhelming to me
2