0

Is there some way/annotation by which I can add the description to the parameters of a RestEasy web service? I went through the api-doc of the annotations, but found nothing there.

This is in order to add the descriptions so that they are reflected in the REST API documentation which I'll be auto-generating using some tool.

An example web service interface:

@Path("list-all")
@GET
@RBAC(type = { CRUDEnum.READ }, capability = { "PowerUser" })
@ParseContext
@Produces( {
        "application/json",
        "application/xml"})
public net.myapp.services getAllDevices(
        @QueryParam("start") int param0, @QueryParam("limit") int param1);

1 Answer 1

1

Found the way for this. There is no REST annotation to add the parameter description.

The solution for this is to use the typical java-doc annotation.

e.g.

/** 
 * @param param0 Paging parameter
 * @param param1 Paging parameter
 * */
@Path("list-all")
@GET
@RBAC(type = { CRUDEnum.READ }, capability = { "PowerUser" })
@ParseContext
@Produces( {
        "application/json",
        "application/xml"})
public net.myapp.services getAllDevices(
        @QueryParam("start") int param0, @QueryParam("limit") int param1);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.