use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.
the class AutoValidationDemosCreateAndGetBuilder method validateInput.
public static ValidationResult validateInput(ValidationDemo input) {
Map<String, List<String>> annotations = new HashMap<String, List<String>>();
annotations.put("createOnly", Arrays.asList("stringB", "intB", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo2", "MapWithTyperefs/*/id"));
annotations.put("readOnly", Arrays.asList("stringA", "intA", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo1", "ArrayWithInlineRecord/*/bar1", "validationDemoNext/stringB", "validationDemoNext/UnionFieldWithInlineRecord"));
RestLiDataValidator validator = new RestLiDataValidator(annotations, ValidationDemo.class, ResourceMethod.CREATE);
return validator.validateInput(input);
}
use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.
the class AutoValidationDemosPartialUpdateBuilder method validateInput.
public static ValidationResult validateInput(PatchRequest<ValidationDemo> patch) {
Map<String, List<String>> annotations = new HashMap<String, List<String>>();
annotations.put("createOnly", Arrays.asList("stringB", "intB", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo2", "MapWithTyperefs/*/id"));
annotations.put("readOnly", Arrays.asList("stringA", "intA", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo1", "ArrayWithInlineRecord/*/bar1", "validationDemoNext/stringB", "validationDemoNext/UnionFieldWithInlineRecord"));
RestLiDataValidator validator = new RestLiDataValidator(annotations, ValidationDemo.class, ResourceMethod.PARTIAL_UPDATE);
return validator.validateInput(patch);
}
use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.
the class AutoValidationDemosUpdateBuilder method validateInput.
public static ValidationResult validateInput(ValidationDemo input) {
Map<String, List<String>> annotations = new HashMap<String, List<String>>();
annotations.put("createOnly", Arrays.asList("stringB", "intB", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo2", "MapWithTyperefs/*/id"));
annotations.put("readOnly", Arrays.asList("stringA", "intA", "UnionFieldWithInlineRecord/com.linkedin.restli.examples.greetings.api.myRecord/foo1", "ArrayWithInlineRecord/*/bar1", "validationDemoNext/stringB", "validationDemoNext/UnionFieldWithInlineRecord"));
RestLiDataValidator validator = new RestLiDataValidator(annotations, ValidationDemo.class, ResourceMethod.UPDATE);
return validator.validateInput(input);
}
use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.
the class ChainedTyperefsBatchUpdateRequestBuilder 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_UPDATE);
return validator.validateInput(input);
}
use of com.linkedin.restli.common.validation.RestLiDataValidator in project parseq by linkedin.
the class ComplexKeysBatchCreateBuilder method validateInput.
public static ValidationResult validateInput(Message input) {
Map<String, List<String>> annotations = new HashMap<String, List<String>>();
RestLiDataValidator validator = new RestLiDataValidator(annotations, Message.class, ResourceMethod.BATCH_CREATE);
return validator.validateInput(input);
}
Aggregations