use of com.linkedin.data.template.DynamicRecordMetadata in project rest.li by linkedin.
the class ExampleRequestResponseGenerator method buildActionResult.
private ActionResult<?> buildActionResult(ActionSchema actionSchema) {
DynamicRecordMetadata returnsMetadata = _resourceSpec.getActionResponseMetadata(actionSchema.getName());
if (actionSchema.hasReturns()) {
FieldDef<?> fieldDef = returnsMetadata.getFieldDef("value");
Object returnValue = generateFieldDefValue(fieldDef);
return new ActionResult<>(returnValue);
} else {
return null;
}
}
Aggregations