From 8924d9b2efd52132876fcd106c625a2a2db7a295 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 23 Apr 2024 10:22:43 +0800 Subject: [PATCH] Fix compare api swagger (#30648) The swagger format on #30349 is not right. This PR will fix it. --- routers/api/v1/repo/compare.go | 2 +- templates/swagger/v1_json.tmpl | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/routers/api/v1/repo/compare.go b/routers/api/v1/repo/compare.go index 549b9b7fa91..cfd61d768c5 100644 --- a/routers/api/v1/repo/compare.go +++ b/routers/api/v1/repo/compare.go @@ -16,7 +16,7 @@ import ( // CompareDiff compare two branches or commits func CompareDiff(ctx *context.APIContext) { - // swagger:operation GET /repos/{owner}/{repo}/compare/{basehead} Get commit comparison information + // swagger:operation GET /repos/{owner}/{repo}/compare/{basehead} repository repoCompareDiff // --- // summary: Get commit comparison information // produces: diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 532b8880bc8..faf57454d7a 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -5346,12 +5346,10 @@ "application/json" ], "tags": [ - "Get", - "commit", - "comparison" + "repository" ], "summary": "Get commit comparison information", - "operationId": "information", + "operationId": "repoCompareDiff", "parameters": [ { "type": "string",