Closed msramosjr closed 3 years ago
@Wicpar do you have any thoughts about this?
The problem appeared after adding AnnotationTarget.VALUE_PARAMETER to annotations and for some reason these annotations became missing in the annotations list for parameters.
I remember some issue i had with something like that when i originally implemented it. It has to do with the way annotations are bound to diferent parts depending on what kind they are.
Fixed it, pushing update
Thank you guys! @Wicpar could you please release another version?
@msramosjr done
@Wicpar thanks!
While trying to migrate from
0.2-beta.13
to0.2-beta.15
, I found that my validators stopped working. I then tried0.2-beta.14
and found out that the issue was happening there too. Apparently, all validators stopped working. I've tested@MinLength, @MaxLength, @Min, @Max
. They are simply not being applied.In order to show how to reproduce the problem. I changed
Minimal.kt
example on line 120 and added a@MinLength
validator.data class StringUsable(@MinLength(10) val str: String)
When calling
curl -X POST "http://localhost:8080/block" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"str\":\"Ho\"}"
In
0.2-beta.13
the response is an HTTP 500 and a stacktrace is logged on server, as expected:But in
0.2-beta.14
(and0.2-beta.15
),@MinLength
annotation is ignored and server response is 200 with no stacktrace on server and the following response body: