Skip to content

repoMergePullRequest Swagger not up-to-date #5799

Closed
@xabufr

Description

@xabufr

Description

Swagger description doesn't reflect API for repoMergePullRequest endpoint.
Some parameters needs to be sent: https://github.com/go-gitea/gitea/blob/master/modules/auth/repo_form.go#L366

type MergePullRequestForm struct {
	Do                string `binding:"Required;In(merge,rebase,rebase-merge,squash)"`
	MergeTitleField   string
	MergeMessageField string
}

But the swagger description doesn't mention them: https://github.com/go-gitea/gitea/blob/master/templates/swagger/v1_json.tmpl#L3660

...
{
        "produces": [
          "application/json"
        ],
        "tags": [
          "repository"
        ],
        "summary": "Merge a pull request",
        "operationId": "repoMergePullRequest",
        "parameters": [
          {
            "type": "string",
            "description": "owner of the repo",
            "name": "owner",
            "in": "path",
            "required": true
          },
          {
            "type": "string",
            "description": "name of the repo",
            "name": "repo",
            "in": "path",
            "required": true
          },
          {
            "type": "integer",
            "format": "int64",
            "description": "index of the pull request to merge",
            "name": "index",
            "in": "path",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/responses/empty"
          },
          "405": {
            "$ref": "#/responses/empty"
          }
        }
      }
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/docsThis PR mainly updates/creates documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions