Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7876

/pull-requests api under-documentation leads to attributes/properties confusion

    XMLWordPrintable

Details

    Description

      The documentation for /pull-requests GET method mysteriously refers to withAttributes and withProperties without explaining what they are, but both are documented to be set to TRUE by default. In earlier versions of Stash, we noticed attributes being returned such as:

      "attributes" : {
          "commentCount" : 18,
          "openTaskCount" : 0,
          "resolvedTaskCount" : 0
      }
      

      which seems pretty useful, so we wrote some code that relied on this. After upgrading to 4.0.1, our code broke because this information is now in the "properties" key, not the "attributes" key. Is this a bug? Hard to say because the documentation is completely silent on the issue. The "attributes"/"properties" are completely undocumented, and do not show up in the GET example for /pull-requests. Likewise for the distinction between withAttributes and withProperties. Which compels us to wonder whether this functionality is even supported by Atlassian.

      If it's really unsupported, you can just close this issue, and we won't rely on it. But if it is supported, please document it appropriately (at least by showing the key in the GET example).

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              e5ec5cdc325a jfultz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: