Uploaded image for project: 'Repository'
  1. Repository
  2. REPO-293

Introduce an isFile top level property

    Details

      Description

      As a developer using the REST API I want to know if the node returned is a sub-type of cm:content (or not) so that I can develop a client that handles all types of node.

      NOTE: A value of "false" for isFolder is not enough to know whether a node descends from "cm:content" or not as the /children endpoint can return nodes that descend from "cm:cmobject".

      Acceptance Criteria

      • The default response for a node has an isFile boolean property
      • The isFile property has a value of "true" if the type of the node is "cm:content" or descends from "cm:content"
      • The isFile property has a value of "true" if the type of the node is "app:filelink" or descends from "app:filelink" and the type of the destination node is "cm:content" or descends from "cm:content"
      • All acceptance criteria from RA-638 are satisfied

      NOTE: Example partial responses below also show "isLink" which can be (optionally) returned using "select=isLink"

      Example partial response for a node with a type of ia:calendar (subtype of cm:folder)

      {
         "id": "55eeb019-7d35-478c-bae7-8863fa234761",
         "isFolder": true,
         "isFile": false,
         "isLink": false,
         "nodeType": "ia:calendar",
         ...
      }
      

      Example partial response for a node with a type of cm:dictionaryModel (subtype of cm:content)

      {
         "id": "55eeb019-7d35-478c-bae7-8863fa234761",
         "isFolder": false,
         "isFile": true,
         "isLink": false,
         "nodeType": "cm:dictionaryModel",
         ...
      }
      

      Example partial response for a node with a type of cm:failedThumbnail (subtype of cm:cmobject)

      {
         "id": "55eeb019-7d35-478c-bae7-8863fa234761",
         "isFolder": false,
         "isFile": false,
         "isLink": false,
         "nodeType": "cm:failedThumbnail",
         ...
      }
      

      Example partial response for a node with a type of app:filelink (subtype of cm:link)

      {
         "id": "55eeb019-7d35-478c-bae7-8863fa234761",
         "isFolder": false,
         "isFile": true,
         "isLink": true,
         "nodeType": "app:filelink",
         ...
      }
      

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  gcornwell Gavin Cornwell [X] (Inactive)
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel