Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify how to use custom typeref return types for Action methods #497

Open
evanw555 opened this issue Dec 22, 2020 · 0 comments
Open

Clarify how to use custom typeref return types for Action methods #497

evanw555 opened this issue Dec 22, 2020 · 0 comments
Labels
documentation Documentation errors or suggestions (https://rest.li/)

Comments

@evanw555
Copy link
Contributor

evanw555 commented Dec 22, 2020

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 evanw555 added the documentation Documentation errors or suggestions (https://rest.li/) label Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation errors or suggestions (https://rest.li/)
Projects
None yet
Development

No branches or pull requests

1 participant