Skip to content

repoMergePullRequest Swagger not up-to-date #5799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
xabufr opened this issue Jan 22, 2019 · 0 comments · Fixed by #5996
Closed
2 of 7 tasks

repoMergePullRequest Swagger not up-to-date #5799

xabufr opened this issue Jan 22, 2019 · 0 comments · Fixed by #5996
Labels
type/docs This PR mainly updates/creates documentation

Comments

@xabufr
Copy link
Contributor

xabufr commented Jan 22, 2019

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"
          }
        }
      }
...
}
@lafriks lafriks added the type/docs This PR mainly updates/creates documentation label Jan 22, 2019
xabufr added a commit to xabufr/gitea that referenced this issue Feb 8, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/docs This PR mainly updates/creates documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants