From ebc8729dcfd108bf63304e17573956358eba22a6 Mon Sep 17 00:00:00 2001 From: abeizn Date: Fri, 8 Mar 2024 17:58:53 +0800 Subject: [PATCH] fix: add connectionId params on swag --- backend/plugins/ae/api/connection.go | 1 + backend/plugins/bamboo/api/connection_api.go | 1 + backend/plugins/bitbucket/api/connection_api.go | 1 + backend/plugins/bitbucket_server/api/connection.go | 1 + backend/plugins/circleci/api/connection.go | 1 + backend/plugins/feishu/api/connection.go | 1 + backend/plugins/gitee/api/connection.go | 1 + backend/plugins/github/api/connection_api.go | 1 + backend/plugins/gitlab/api/connection_api.go | 1 + backend/plugins/jenkins/api/connection_api.go | 1 + backend/plugins/jira/api/connection_api.go | 1 + backend/plugins/opsgenie/api/connection.go | 1 + backend/plugins/pagerduty/api/connection.go | 1 + backend/plugins/slack/api/connection.go | 1 + backend/plugins/sonarqube/api/connection_api.go | 1 + backend/plugins/tapd/api/connection.go | 1 + backend/plugins/teambition/api/connection.go | 1 + backend/plugins/trello/api/connection.go | 1 + backend/plugins/zentao/api/connection.go | 1 + 19 files changed, 19 insertions(+) diff --git a/backend/plugins/ae/api/connection.go b/backend/plugins/ae/api/connection.go index 2f15da8aa14..2e42c6152ee 100644 --- a/backend/plugins/ae/api/connection.go +++ b/backend/plugins/ae/api/connection.go @@ -84,6 +84,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test ae connection // @Description Test AE Connection // @Tags plugins/ae +// @Param connectionId path int true "connection ID" // @Success 200 {object} shared.ApiBody "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/bamboo/api/connection_api.go b/backend/plugins/bamboo/api/connection_api.go index c15a8b84c10..3fd72a22e48 100644 --- a/backend/plugins/bamboo/api/connection_api.go +++ b/backend/plugins/bamboo/api/connection_api.go @@ -81,6 +81,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test bamboo connection // @Description Test bamboo Connection // @Tags plugins/bamboo +// @Param connectionId path int true "connection ID" // @Success 200 {object} BambooTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/bitbucket/api/connection_api.go b/backend/plugins/bitbucket/api/connection_api.go index 0ce89670fb6..15851e3ab07 100644 --- a/backend/plugins/bitbucket/api/connection_api.go +++ b/backend/plugins/bitbucket/api/connection_api.go @@ -95,6 +95,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test bitbucket connection // @Description Test bitbucket Connection // @Tags plugins/bitbucket +// @Param connectionId path int true "connection ID" // @Success 200 {object} BitBucketTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/bitbucket_server/api/connection.go b/backend/plugins/bitbucket_server/api/connection.go index c141849a061..a8043f9c369 100644 --- a/backend/plugins/bitbucket_server/api/connection.go +++ b/backend/plugins/bitbucket_server/api/connection.go @@ -87,6 +87,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test bitbucket connection // @Description Test bitbucket Connection // @Tags plugins/bitbucket +// @Param connectionId path int true "connection ID" // @Success 200 {object} BitBucketTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/circleci/api/connection.go b/backend/plugins/circleci/api/connection.go index 3a356ab8485..9b8d75cf520 100644 --- a/backend/plugins/circleci/api/connection.go +++ b/backend/plugins/circleci/api/connection.go @@ -90,6 +90,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test circleci connection // @Description Test circleci Connection // @Tags plugins/circleci +// @Param connectionId path int true "connection ID" // @Success 200 {object} CircleciTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/feishu/api/connection.go b/backend/plugins/feishu/api/connection.go index aee55ea4230..72771e1fb83 100644 --- a/backend/plugins/feishu/api/connection.go +++ b/backend/plugins/feishu/api/connection.go @@ -81,6 +81,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test feishu connection // @Description Test feishu Connection. endpoint: https://open.feishu.cn/open-apis/ // @Tags plugins/feishu +// @Param connectionId path int true "connection ID" // @Success 200 {object} FeishuTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/gitee/api/connection.go b/backend/plugins/gitee/api/connection.go index 17d3bcc3ecc..4677aa65ca5 100644 --- a/backend/plugins/gitee/api/connection.go +++ b/backend/plugins/gitee/api/connection.go @@ -98,6 +98,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test gitee connection // @Description Test gitee Connection. endpoint: https://gitee.com/api/v5/ // @Tags plugins/gitee +// @Param connectionId path int true "connection ID" // @Success 200 {object} GiteeTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/github/api/connection_api.go b/backend/plugins/github/api/connection_api.go index f4dd4066b92..570125d2991 100644 --- a/backend/plugins/github/api/connection_api.go +++ b/backend/plugins/github/api/connection_api.go @@ -383,6 +383,7 @@ func testExistingConnection(ctx context.Context, conn models.GithubConn) (*Githu // @Summary test github connection // @Description Test github Connection // @Tags plugins/github +// @Param connectionId path int true "connection ID" // @Success 200 {object} GithubMultiTestConnResponse // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/gitlab/api/connection_api.go b/backend/plugins/gitlab/api/connection_api.go index 95b551536ba..598d5b975e6 100644 --- a/backend/plugins/gitlab/api/connection_api.go +++ b/backend/plugins/gitlab/api/connection_api.go @@ -100,6 +100,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test gitlab connection // @Description Test gitlab Connection // @Tags plugins/gitlab +// @Param connectionId path int true "connection ID" // @Success 200 {object} GitlabTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/jenkins/api/connection_api.go b/backend/plugins/jenkins/api/connection_api.go index ad54cfe35bb..b213bb06859 100644 --- a/backend/plugins/jenkins/api/connection_api.go +++ b/backend/plugins/jenkins/api/connection_api.go @@ -101,6 +101,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test jenkins connection // @Description Test Jenkins Connection // @Tags plugins/jenkins +// @Param connectionId path int true "connection ID" // @Success 200 {object} JenkinsTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/jira/api/connection_api.go b/backend/plugins/jira/api/connection_api.go index 0a6175fc491..c72d8cbbab6 100644 --- a/backend/plugins/jira/api/connection_api.go +++ b/backend/plugins/jira/api/connection_api.go @@ -146,6 +146,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test jira connection // @Description Test Jira Connection // @Tags plugins/jira +// @Param connectionId path int true "connection ID" // @Success 200 {object} JiraTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/opsgenie/api/connection.go b/backend/plugins/opsgenie/api/connection.go index bd666d039c5..77f4989e36e 100644 --- a/backend/plugins/opsgenie/api/connection.go +++ b/backend/plugins/opsgenie/api/connection.go @@ -62,6 +62,7 @@ func testOpsgenieConn(ctx context.Context, connection models.OpsgenieConn) (*plu // @Summary test opsgenie connection // @Description Test Opsgenie Connection // @Tags plugins/opsgenie +// @Param connectionId path int true "connection ID" // @Success 200 {object} shared.ApiBody "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/pagerduty/api/connection.go b/backend/plugins/pagerduty/api/connection.go index fbf09a70bd2..e3295719adb 100644 --- a/backend/plugins/pagerduty/api/connection.go +++ b/backend/plugins/pagerduty/api/connection.go @@ -76,6 +76,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test pagerduty connection // @Description Test Pagerduty Connection // @Tags plugins/pagerduty +// @Param connectionId path int true "connection ID" // @Success 200 {object} shared.ApiBody "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/slack/api/connection.go b/backend/plugins/slack/api/connection.go index fd13d7ef69c..afa5cb377f7 100644 --- a/backend/plugins/slack/api/connection.go +++ b/backend/plugins/slack/api/connection.go @@ -81,6 +81,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test slack connection // @Description Test slack Connection. endpoint: https://open.slack.cn/open-apis/ // @Tags plugins/slack +// @Param connectionId path int true "connection ID" // @Success 200 {object} SlackTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/sonarqube/api/connection_api.go b/backend/plugins/sonarqube/api/connection_api.go index 536ae85760c..feb1905a63d 100644 --- a/backend/plugins/sonarqube/api/connection_api.go +++ b/backend/plugins/sonarqube/api/connection_api.go @@ -107,6 +107,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test sonarqube connection // @Description Test sonarqube Connection // @Tags plugins/sonarqube +// @Param connectionId path int true "connection ID" // @Success 200 {object} SonarqubeTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/tapd/api/connection.go b/backend/plugins/tapd/api/connection.go index f701f1b7ff6..e7e9733ab9d 100644 --- a/backend/plugins/tapd/api/connection.go +++ b/backend/plugins/tapd/api/connection.go @@ -94,6 +94,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test tapd connection // @Description Test Tapd Connection // @Tags plugins/tapd +// @Param connectionId path int true "connection ID" // @Success 200 {object} TapdTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/teambition/api/connection.go b/backend/plugins/teambition/api/connection.go index 16786306097..ee40bc8ed18 100644 --- a/backend/plugins/teambition/api/connection.go +++ b/backend/plugins/teambition/api/connection.go @@ -108,6 +108,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test teambition connection // @Description Test teambition Connection // @Tags plugins/teambition +// @Param connectionId path int true "connection ID" // @Success 200 {object} TeambitionTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/trello/api/connection.go b/backend/plugins/trello/api/connection.go index f57e692922e..39aeaa3ba15 100644 --- a/backend/plugins/trello/api/connection.go +++ b/backend/plugins/trello/api/connection.go @@ -94,6 +94,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test trello connection // @Description Test trello Connection // @Tags plugins/trello +// @Param connectionId path int true "connection ID" // @Success 200 {object} TrelloTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error" diff --git a/backend/plugins/zentao/api/connection.go b/backend/plugins/zentao/api/connection.go index d7cdf6fabc8..48993d4dc8c 100644 --- a/backend/plugins/zentao/api/connection.go +++ b/backend/plugins/zentao/api/connection.go @@ -101,6 +101,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, // @Summary test zentao connection // @Description Test zentao Connection // @Tags plugins/zentao +// @Param connectionId path int true "connection ID" // @Success 200 {object} ZentaoTestConnResponse "Success" // @Failure 400 {string} errcode.Error "Bad Request" // @Failure 500 {string} errcode.Error "Internal Error"