Skip to content

Commit f347768

Browse files
committed
fix(swagger): Update diffpatch endpoint to use ApplyDiffPatchOptions
1 parent 03fce8f commit f347768

File tree

3 files changed

+104
-53
lines changed

3 files changed

+104
-53
lines changed

routers/api/v1/repo/patch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
// ApplyDiffPatch handles API call for applying a patch
1616
func ApplyDiffPatch(ctx *context.APIContext) {
17-
// swagger:operation POST /repos/{owner}/{repo}/diffpatch repository repoApplyDiffPatch
17+
// swagger:operation POST /repos/{owner}/{repo}/contents/diffpatch repository repoApplyDiffPatch
1818
// ---
1919
// summary: Apply diff patch to repository
2020
// consumes:
@@ -36,7 +36,7 @@ func ApplyDiffPatch(ctx *context.APIContext) {
3636
// in: body
3737
// required: true
3838
// schema:
39-
// "$ref": "#/definitions/UpdateFileOptions"
39+
// "$ref": "#/definitions/ApplyDiffPatchFileOptions"
4040
// responses:
4141
// "200":
4242
// "$ref": "#/responses/FileResponse"

routers/api/v1/swagger/options.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,4 +222,7 @@ type swaggerParameterBodies struct {
222222

223223
// in:body
224224
LockIssueOption api.LockIssueOption
225+
226+
// in:body
227+
ApplyDiffPatchFileOptions api.ApplyDiffPatchFileOptions
225228
}

templates/swagger/v1_json.tmpl

Lines changed: 99 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)