rest.li icon indicating copy to clipboard operation
rest.li copied to clipboard

Clarify how to use custom typeref return types for Action methods

Open evanw555 opened this issue 4 years ago • 0 comments

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);
}

evanw555 avatar Dec 22 '20 00:12 evanw555