Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4935

Support for sub-resources in rest-plugin

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 6.1.0
    • Plugin - REST
    • None

    Description

      As of now, the rest-plugin supports only 1 level of hierarchy like /resource/$resource_id

      Can we extend this to implement multi levels like below : 
      /resource/$resource_id/sub_resource/$sub_resource_id 

       

      Here is an example : 
      For getting an organization info, we can use a REST API like /organizations/organization_id (supported already)

      To get details of an employee of an organization we need to map it as a 
      sub-resource like /organizations/organization_id/employees/employee_id 
      rather than just making it as /employees/employee_id. 

      Note : In this case there are 2 ids in the URL 
      1. resource_id - organization_id and
      2. the sub_resource_id - employee_id.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            devagerald Deva Gerald

            Dates

              Created:
              Updated:

              Slack

                Issue deployment