You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 28, 2018. It is now read-only.
In particular, the solution should at least include the ability to check if a
parameter is present and raise an error if is not.
In general and eventually the solution should allow flexible parameter validation.
public interface MultivaluedParameterExtractorProvider { }
public interface MultivaluedParameterExtractorWorkers { }
and the same type of pattern can be utilized.
One can utilize AOP method-level interceptors to support @required
and check for a null value. This solution is much better if one needs to take
into account more than one value.
I also wonder if there is a more general approach to parameter
validation we can apply with the bean validation framework.
Add more flexible parameter validation to Jersey.
In particular, the solution should at least include the ability to check if a
parameter is present and raise an error if is not.
In general and eventually the solution should allow flexible parameter validation.
Possible solutions:
Jersey supports an @required annotation; or
Exposes a lower-level abstraction of MultivaluedParameterExtractor
(which is an internally used interface):
public interface MultivaluedParameterExtractor
{ Object extract(MultivaluedMap<String, String> parameters); }
public interface MultivaluedParameterExtractorProvider { }
public interface MultivaluedParameterExtractorWorkers { }
and the same type of pattern can be utilized.
and check for a null value. This solution is much better if one needs to take
into account more than one value.
I also wonder if there is a more general approach to parameter
validation we can apply with the bean validation framework.
Environment
Operating System: All
Platform: All
URL: http://n2.nabble.com/Required-parameters-on-a-Resource-td3446928.html
The text was updated successfully, but these errors were encountered: