From 29728c95528c39eab4dd87e7c6e3e53b13b93cae Mon Sep 17 00:00:00 2001 From: abeizn Date: Fri, 8 Mar 2024 18:03:37 +0800 Subject: [PATCH] fix: add connectionId params on swag (#7152) --- backend/plugins/ae/api/connection.go | 1 + backend/plugins/bamboo/api/connection.go | 1 + backend/plugins/bitbucket/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 + 18 files changed, 18 insertions(+) diff --git a/backend/plugins/ae/api/connection.go b/backend/plugins/ae/api/connection.go index 5ad29f0f8ef..7c7fa9eb579 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.go b/backend/plugins/bamboo/api/connection.go index f863bad92d9..9e5617fd053 100644 --- a/backend/plugins/bamboo/api/connection.go +++ b/backend/plugins/bamboo/api/connection.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.go b/backend/plugins/bitbucket/api/connection.go index bc3fc3ee894..f513ebaa6f5 100644 --- a/backend/plugins/bitbucket/api/connection.go +++ b/backend/plugins/bitbucket/api/connection.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/circleci/api/connection.go b/backend/plugins/circleci/api/connection.go index 909b2c77fae..de44e0f82bd 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 6d0abb986cd..4a6998e15c4 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 be61db56db4..a73a233aff0 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 b02b5ec1afc..8d98bb4373e 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 5acce35e9ca..52d8847472a 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 ce2454b0d91..37936ecacec 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 b06840260fc..8e338b97620 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 8cc7340b3a4..7cb2369071e 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 13be31f96c1..3bc53aa22ed 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 466288163ff..b6ffdf67a62 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 44d2c3b71d5..08fdd8e3e55 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 56b09e92bab..3e44c4c383b 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 1d935f06d5f..36df585452d 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 0ca05430dd9..3029c99ac47 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 7be4a768bff..2686a62df54 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"