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

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

Kenneth, I like it and did an iteration on it.  One of the problems is that we 
currently don't know what input parameters can lead to which output states.  
While its pretty simple for most REST endpoints, complicated ones can be 
difficult to automate.  So, what do you think of the following?:

@RestEndpoint({
        @RestQuery(
                description = "Starts a capture using the default devices as 
appropriate.",
                responses = {
                        @RestResponse(responseCode = 200, description = "When 
the capture started correctly"),
                        @RestResponse(responseCode = 400, description = "When 
there are no media devices")},
                pathParameters = {
                        @RestParameter(name = "location", description = "The 
room of the capture agent", false)},
                queryParameters = {
                        @RestParameter(name = "id", description = "The ID of 
the capture to start", true)},
                returnFormats = {"XML", "JSON"},
                returnDescription = "A list of capture agent things",
                methods = {RestMethods.GET, RestMethods.POST}),
        @RestQuery(
                description = "Starts a capture using a custom parameter.",
                responses = {
                        @RestResponse(responseCode = 200, description = "When 
the capture started correctly."),
                        @RestResponse(responseCode = 505, description = "When 
the server is too busy to respond.")},
                queryParameters = {
                        @RestParameter(name = "id", description = "The ID of 
the capture to start", true)},
                returnFormats = {"JSON"},
                returnDescription = "true or false",
                methods = {RestMethods.PATCH})
)

> 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, documentationQuickSample.zip, 
> 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