@Provider public class FuzzyEnumParamConverterProvider extends Object implements javax.ws.rs.ext.ParamConverterProvider
By default jersey will return a 404 if a resource parameter of an enum type cannot be converted. This class
provides converters for all enum types used as resource parameters that provide better error handling. If an
invalid value is provided for the parameter a 400 Bad Request
is returned and the error message will
include the parameter name and a list of valid values.
Constructor and Description |
---|
FuzzyEnumParamConverterProvider() |
Modifier and Type | Method and Description |
---|---|
<T> javax.ws.rs.ext.ParamConverter<T> |
getConverter(Class<T> rawType,
Type genericType,
Annotation[] annotations) |
@Nullable public <T> javax.ws.rs.ext.ParamConverter<T> getConverter(Class<T> rawType, @Nullable Type genericType, Annotation[] annotations)
getConverter
in interface javax.ws.rs.ext.ParamConverterProvider
Copyright © 2019. All rights reserved.