Closed
Description
- Gitea version (or commit ref): eb0ee6b
- Git version:
- Operating system:
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes https://try.gitea.io/api/swagger#/repository/repoMergePullRequest
- No
- Not relevant
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"
}
}
}
...
}