diff options
author | qwerty287 <80460567+qwerty287@users.noreply.github.com> | 2021-09-22 01:04:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-22 01:04:53 +0200 |
commit | 0fa153f4219bc6a447891f30f4dbc60bf180ee4c (patch) | |
tree | 638eb74e1624f289f749073438fa33328c7184ac /templates/swagger | |
parent | 10108b184efe28da85bbbc7efef24a79ccbd3cd0 (diff) | |
download | gitea-0fa153f4219bc6a447891f30f4dbc60bf180ee4c.tar.gz gitea-0fa153f4219bc6a447891f30f4dbc60bf180ee4c.zip |
Merge endpoints for pull diff/patch (#17104)
this merges the two API endpoints for the PR diff/patch in to one
Diffstat (limited to 'templates/swagger')
-rw-r--r-- | templates/swagger/v1_json.tmpl | 51 |
1 files changed, 9 insertions, 42 deletions
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 77c89aea3a..63eba45832 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -7357,7 +7357,7 @@ } } }, - "/repos/{owner}/{repo}/pulls/{index}.diff": { + "/repos/{owner}/{repo}/pulls/{index}.{diffType}": { "get": { "produces": [ "text/plain" @@ -7365,8 +7365,8 @@ "tags": [ "repository" ], - "summary": "Get a pull request diff", - "operationId": "repoDownloadPullDiff", + "summary": "Get a pull request diff or patch", + "operationId": "repoDownloadPullDiffOrPatch", "parameters": [ { "type": "string", @@ -7389,48 +7389,15 @@ "name": "index", "in": "path", "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/string" - }, - "404": { - "$ref": "#/responses/notFound" - } - } - } - }, - "/repos/{owner}/{repo}/pulls/{index}.patch": { - "get": { - "produces": [ - "text/plain" - ], - "tags": [ - "repository" - ], - "summary": "Get a pull request patch file", - "operationId": "repoDownloadPullPatch", - "parameters": [ - { - "type": "string", - "description": "owner of the repo", - "name": "owner", - "in": "path", - "required": true }, { + "enum": [ + "diff", + "patch" + ], "type": "string", - "description": "name of the repo", - "name": "repo", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "index of the pull request to get", - "name": "index", + "description": "whether the output is diff or patch", + "name": "diffType", "in": "path", "required": true } |