I have a PathParam that is an enum, with an uppercase value. I'd like to support the client sending a lower case value, too, eg
public enum Type {
NOW
}
Currently, unless Type is uppercase the client receives a 404.
One solution is to wrap it in an AbstractParam that does a .toLowerCase on the string, but this seems like overkill (although it does work).
I tried using an @JsonCreator on the enum itself, but DW seems to ignore this in the default config. I also started tracing through the innards of the DW Jackson project, and it seems to register a FuzzyEnumModule which should do what we need, but doesn't :)
How have others tackled this problem?
--
You received this message because you are subscribed to a topic in the Google Groups "dropwizard-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dropwizard-user/eyPlmz36CJ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dropwizard-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.