[ 
http://opencast.jira.com/browse/MH-6375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=23880#action_23880
 ] 

Christopher Brooks commented on MH-6375:
----------------------------------------

I like this but looking at the CreateSiteServlet I find a couple of things 
kludgy, in particular you annotate the class instead of the methods, but our 
rest endpoints tend to bind right to a method so now you have method docs in 
two places.  I love that clear and unambiguous way to doc up the return codes.

What do you think of this as a potential example (keeping in mind I know little 
about annotations in java and the level of reflection they afford...):

  @DocsResponse(200,"When the capture started correctly")
  @DocsResponse(400,"When there are no media devices")
  @DocsQueryParameter("id","The ID of the capture to start")
  @DocsDescription("Starts a capture using the default devices as appropriate.")
  
  @GET
  @Produces(MediaType.TEXT_PLAIN)
  @Path("startCapture")
  public Response startCapture(String id) {
  ...
  }

> Update rest documentation method to be similar to the one in Sakai
> ------------------------------------------------------------------
>
>                 Key: MH-6375
>                 URL: http://opencast.jira.com/browse/MH-6375
>             Project: Matterhorn Project
>          Issue Type: Task
>          Components: Architecture & Services
>    Affects Versions: 1.2
>            Reporter: Christopher Brooks
>            Assignee: Kenneth Lui
>             Fix For: 1.2
>
>         Attachments: CreateSiteServlet.java, SakaiDocumentationCode.zip
>
>
> The Sakai project uses a system similar to ours for building their rest 
> endpoint docs, but they use attributes instead of code.  This has some huge 
> readability benefits.  Check out how they do it and provide an example with 
> this ticket, including an example of how we do it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://opencast.jira.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to