I've got an endpoint that is:
api/entities/{year}
and my function looks like:
get(@PathVariable(name = "year") Year year)
But when I try to hit the endpoint I, expectedly, get an error that it can't convert from type String to type Year. I obviously need something like a @DateTypeFormat, but that doesn't really work.
Is there a way to format the incoming value to be a Year, or should I rework my API to not use a Year?