rest.li
rest.li copied to clipboard
Clarify how to use custom typeref return types for Action methods
Currently, the documentation mentions that Action methods can return "Custom types", but that's about it. It's not clear that in order to do so, the returnTyperef
attribute of the @Action
annotation must be set to a valid typeref class.
Location in the documentation: https://linkedin.github.io/rest.li/user_guide/restli_server#action
This will be somewhat clarified by the changes made in #496
e.g.
@Action(name = "doAction", returnTyperef = CustomLongRef.class)
public CustomLong doAction() {
return new CustomLong(1L);
}