1) I think the name of this query is missing. Also, "OK" does not need to be
included in @RestResponse.Given the response code, the engine will add it to
the description (same thing happens to Internal Server Error, etc.)
2) From our IRC discussion, you suggested to make description optional and
make returnDescription required. It is possible, let's see if anyone has
other suggestion?
3) Yes, they can be made to optional. I can make a default value (empty
array) for them. This only requires a small change. If others also agree
that they should be optional, I can make a quick patch!
Cheers,
Kenneth
On Fri, Apr 8, 2011 at 12:10, Josh Holtzman [via Opencast] <
[email protected]> wrote:
> I have some questions about the new rest doc annotations. For reference,
> here's the endpoint I'm working with:
>
> @GET
> @Path("/list.json")
> @Produces(MediaType.APPLICATION_JSON)
> @RestQuery(
> description = "Lists the roles as a json array",
> returnDescription = "The list of roles as a json array",
> pathParameters = {}, queryParameters = {},
> reponses = { @RestResponse(responseCode = 200, description = "OK,
> roles returned") })
> public String getRoles() {...}
>
> 1) Am I using this correctly?
> 2) Do we need both a description and a returnDescription? Is the
> returnDescription for a sample of the data returned?
> 3) I'm forced to include empty arrays for pathParameters and
> queryParameters. Can we make these optional?
>
> Thanks,
> Josh
>
> _______________________________________________
> Matterhorn mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=6254918&i=0&by-user=t>
> http://lists.opencastproject.org/mailman/listinfo/matterhorn
>
>
> To unsubscribe please email
> [hidden email]<http://user/SendEmail.jtp?type=node&node=6254918&i=1&by-user=t>
> _______________________________________________
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://opencast.3480289.n2.nabble.com/Questions-about-the-new-REST-documentation-annotations-tp6254918p6254918.html
> To start a new topic under Opencast Matterhorn, email
> [email protected]
> To unsubscribe from Opencast Matterhorn, click
> here<http://opencast.3480289.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2233301&code=aGtrZW5uZXRoQGdtYWlsLmNvbXwyMjMzMzAxfC0xNDIzMzc0NTc3>.
>
>
--
View this message in context:
http://opencast.3480289.n2.nabble.com/Questions-about-the-new-REST-documentation-annotations-tp6254918p6255134.html
Sent from the Opencast Matterhorn mailing list archive at Nabble.com._______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn
To unsubscribe please email
[email protected]
_______________________________________________