Documentation bug REST merge POST

There is a problem with the documentation of the function /REST/API/1.0/PROJECTS/{PROJECTKEY}/REPOS/{REPOSITORYSLUG}/PULL-REQUESTS/{PULLREQUESTID}/MERGE?VERSION

It works with a body defining “version” and without version in the query string. There is no example request json.

I cannot use the error reporting feature explained here: How to report the errors in SDK documentation? - #5 by sfbehnke, the popup never appears. I am behind a firewall and cannot change my browser settings because of policies.

Hi @marten.gustafsson,

There is an example request. You just have to click the “expand” link to see it:

After clicking “expand”:

The request works with either a version query param, or a version in the body of the request. If a version is supplied in the body, it is preferred over one that is supplied as a query parameter.

Hope that helps,
Kristy

These are example responses

Sorry, you’re completely right! It is missing.

I’ve opened BSERV-11810 to track this issue, as there seems to be a problem generating the documentation when the body of the request is optional.

The example that should be there is:

{
    "context": {},
    "autoSubject": "(Optional, 5.7+) true to prepend an auto-generated subject to the message (default), or false to use the message as-is",
    "message": "(Optional) A descriptive message for the merge commit",
    "strategyId": "(Optional) squash",
    "version": 1
}
1 Like