Search in sources :

Example 21 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class CreateGreetingBatchCreateAndGetRequestBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.BATCH_CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 22 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class CreateGreetingBatchCreateRequestBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.BATCH_CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 23 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class CreateGreetingCreateAndGetBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 24 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class CreateGreetingCreateAndGetRequestBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Example 25 with RestLiDataValidator

use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.

the class CreateGreetingCreateBuilder method validateInput.

public static ValidationResult validateInput(Greeting input) {
    Map<String, List<String>> annotations = new HashMap<String, List<String>>();
    RestLiDataValidator validator = new RestLiDataValidator(annotations, Greeting.class, ResourceMethod.CREATE);
    return validator.validateInput(input);
}
Also used : HashMap(java.util.HashMap) RestLiDataValidator(com.linkedin.restli.common.validation.RestLiDataValidator) List(java.util.List)

Aggregations

RestLiDataValidator (com.linkedin.restli.common.validation.RestLiDataValidator)229 HashMap (java.util.HashMap)224 List (java.util.List)223 DataMap (com.linkedin.data.DataMap)4 TemplateRuntimeException (com.linkedin.data.template.TemplateRuntimeException)3 ValidationDemo (com.linkedin.restli.examples.greetings.api.ValidationDemo)3 RestLiServiceException (com.linkedin.restli.server.RestLiServiceException)3 Test (org.testng.annotations.Test)3 ValidationResult (com.linkedin.data.schema.validation.ValidationResult)2 ResourceMethod (com.linkedin.restli.common.ResourceMethod)2 QueryParamsDataMap (com.linkedin.restli.internal.common.QueryParamsDataMap)2 Parameter (com.linkedin.restli.internal.server.model.Parameter)2 PagingContext (com.linkedin.restli.server.PagingContext)2 ResourceConfigException (com.linkedin.restli.server.ResourceConfigException)2 RoutingException (com.linkedin.restli.server.RoutingException)2 HeaderParam (com.linkedin.restli.server.annotations.HeaderParam)2 ByteString (com.linkedin.data.ByteString)1 Message (com.linkedin.data.message.Message)1 DataSchema (com.linkedin.data.schema.DataSchema)1 AbstractValidator (com.linkedin.data.schema.validator.AbstractValidator)1