This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 35409645 feat: add swagger docs for the plugin icla (#2809)
35409645 is described below
commit 354096453aee687a977be38557bc38da169f1922
Author: mindlesscloud <[email protected]>
AuthorDate: Thu Aug 25 17:01:33 2022 +0800
feat: add swagger docs for the plugin icla (#2809)
* feat: add swagger docs for the plugin icla
* refactor: move blueprint/pipeline swagger docs into plugin folder
---
api/blueprints/blueprint_plugin_setting.go | 219 -----------------------------
api/pipelines/pipeline_plugin_plan.go | 176 -----------------------
plugins/dbt/api/swagger.go | 62 ++++++++
plugins/feishu/api/swagger.go | 44 ++++++
plugins/gitee/api/swagger.go | 49 +++++++
plugins/gitextractor/api/swagger.go | 50 +++++++
plugins/github/api/swagger.go | 75 ++++++++++
plugins/gitlab/api/swagger.go | 54 +++++++
plugins/icla/api/swagger.go | 45 ++++++
plugins/jira/api/swagger.go | 69 +++++++++
plugins/refdiff/api/swagger.go | 37 +++++
plugins/tapd/api/swagger.go | 83 +++++++++++
12 files changed, 568 insertions(+), 395 deletions(-)
diff --git a/api/blueprints/blueprint_plugin_setting.go
b/api/blueprints/blueprint_plugin_setting.go
deleted file mode 100644
index d3e2a7e7..00000000
--- a/api/blueprints/blueprint_plugin_setting.go
+++ /dev/null
@@ -1,219 +0,0 @@
-package blueprints
-
-import (
- "github.com/apache/incubator-devlake/plugins/core"
- "net/http"
-)
-
-type CodeTransformationRules struct {
- PrType string `mapstructure:"prType" json:"prType"`
- PrComponent string `mapstructure:"prComponent"
json:"prComponent"`
- PrBodyClosePattern string `mapstructure:"prBodyClosePattern"
json:"prBodyClosePattern"`
- IssueSeverity string `mapstructure:"issueSeverity"
json:"issueSeverity"`
- IssuePriority string `mapstructure:"issuePriority"
json:"issuePriority"`
- IssueComponent string `mapstructure:"issueComponent"
json:"issueComponent"`
- IssueTypeBug string `mapstructure:"issueTypeBug"
json:"issueTypeBug"`
- IssueTypeIncident string `mapstructure:"issueTypeIncident"
json:"issueTypeIncident"`
- IssueTypeRequirement string `mapstructure:"issueTypeRequirement"
json:"issueTypeRequirement"`
-}
-
-type TicketTransformationRules struct {
- EpicKeyField string `json:"epicKeyField"`
- StoryPointField string `json:"storyPointField"`
- RemotelinkCommitShaPattern string `json:"remotelinkCommitShaPattern"`
- TypeMappings map[string]struct {
- StandardType string `json:"standardType"`
- } `json:"typeMappings"`
-}
-
-// @Summary blueprints setting for tapd
-// @Description blueprint setting for tapd
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body TapdBlueprintSetting true "json"
-// @Router /blueprints/tapd/blueprint-setting [post]
-func PostTapdBlueprintSetting(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &TapdBlueprintSetting{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type TapdBlueprintSetting []struct {
- Version string `json:"version"`
- Connections []struct {
- Plugin string `json:"plugin"`
- ConnectionID int `json:"connectionId"`
- Scope []struct {
- Options struct {
- WorkspaceId uint64 `mapstruct:"workspaceId"`
- CompanyId uint64 `mapstruct:"companyId"`
- Tasks []string
`mapstruct:"tasks,omitempty"`
- Since string
- } `json:"options"`
- Entities []string `json:"entities"`
- } `json:"scope"`
- } `json:"connections"`
-}
-
-// @Summary blueprints plan for refdiff
-// @Description blueprints plan for refdiff
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body RefdiffBlueprintPlan true "json"
-// @Router /blueprints/refdiff/blueprint-plan [post]
-func PostRefdiffBlueprint(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &RefdiffBlueprintPlan{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type RefdiffBlueprintPlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct {
- RepoID string `json:"repoId"`
- Pairs []struct {
- NewRef string `json:"newRef"`
- OldRef string `json:"oldRef"`
- } `json:"pairs"`
- } `json:"options"`
-}
-
-// @Summary blueprints setting for jira
-// @Description blueprint setting for jira
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint-setting body JiraBlueprintSetting true "json"
-// @Router /blueprints/jira/blueprint-setting [post]
-func PostJiraBlueprintSetting(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &JiraBlueprintSetting{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type JiraBlueprintSetting []struct {
- Version string `json:"version"`
- Connections []struct {
- Plugin string `json:"plugin"`
- ConnectionID int `json:"connectionId"`
- Scope []struct {
- Transformation TicketTransformationRules
`json:"transformation"`
- Options struct {
- BoardId uint64 `json:"boardId"`
- Since string `json:"since"`
- } `json:"options"`
- Entities []string `json:"entities"`
- } `json:"scope"`
- } `json:"connections"`
-}
-
-// @Summary blueprints setting for gitlab
-// @Description blueprint setting for gitlab
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body GitlabBlueprintSetting true "json"
-// @Router /blueprints/gitlab/blueprint-setting [post]
-func PostGitlabBluePrint(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &GitlabBlueprintSetting{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type GitlabBlueprintSetting []struct {
- Version string `json:"version"`
- Connections []struct {
- Plugin string `json:"plugin"`
- ConnectionID int `json:"connectionId"`
- Scope []struct {
- Transformation CodeTransformationRules
`json:"transformation"`
- Options struct {
- ProjectId int `json:"projectId"`
- Since string
- } `json:"options"`
- Entities []string `json:"entities"`
- } `json:"scope"`
- } `json:"connections"`
-}
-
-// @Summary blueprints plan for gitextractor
-// @Description blueprints plan for gitextractor
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body GitextractorBlueprintPlan true "json"
-// @Router /blueprints/gitextractor/blueprint-plan [post]
-func PostGitextractorBlueprint(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &GitextractorBlueprintPlan{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type GitextractorBlueprintPlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct {
- URL string `json:"url"`
- RepoID string `json:"repoId"`
- } `json:"options"`
-}
-
-// @Summary blueprints plan for feishu
-// @Description blueprints plan for feishu
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body FeishuBlueprintPlan true "json"
-// @Router /blueprints/feishu/blueprint-plan [post]
-func PostFeishuBlueprint(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &FeishuBlueprintPlan{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type FeishuBlueprintPlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct{} `json:"options"`
-}
-
-// @Summary blueprints plan for dbt
-// @Description blueprints plan for dbt
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body DbtBlueprintPlan true "json"
-// @Router /blueprints/dbt/blueprint-plan [post]
-func PostDbtBlueprint(input *core.ApiResourceInput) (*core.ApiResourceOutput,
error) {
- blueprint := &DbtBlueprintPlan{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type DbtBlueprintPlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct {
- ProjectPath string `json:"projectPath"`
- ProjectName string `json:"projectName"`
- ProjectTarget string `json:"projectTarget"`
- SelectedModels []string `json:"selectedModels"`
- ProjectVars struct {
- Demokey1 string `json:"demokey1"`
- Demokey2 string `json:"demokey2"`
- } `json:"projectVars"`
- } `json:"options"`
-}
-
-// @Summary blueprints setting for github
-// @Description blueprint setting for github
-// @Tags framework/blueprints
-// @Accept application/json
-// @Param blueprint body GithubBlueprintSetting true "json"
-// @Router /blueprints/github/blueprint-setting [post]
-func PostGithubBluePrint(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- blueprint := &GithubBlueprintSetting{}
- return &core.ApiResourceOutput{Body: blueprint, Status: http.StatusOK},
nil
-}
-
-type GithubBlueprintSetting []struct {
- Version string `json:"version"`
- Connections []struct {
- Plugin string `json:"plugin"`
- ConnectionID int `json:"connectionId"`
- Scope []struct {
- Transformation CodeTransformationRules
`json:"transformation"`
- Options struct {
- Owner string `json:"owner"`
- Repo string `json:"repo"`
- Since string
- } `json:"options"`
- Entities []string `json:"entities"`
- } `json:"scope"`
- } `json:"connections"`
-}
diff --git a/api/pipelines/pipeline_plugin_plan.go
b/api/pipelines/pipeline_plugin_plan.go
deleted file mode 100644
index b2743838..00000000
--- a/api/pipelines/pipeline_plugin_plan.go
+++ /dev/null
@@ -1,176 +0,0 @@
-package pipelines
-
-import (
- "github.com/apache/incubator-devlake/plugins/core"
- "net/http"
-)
-
-type CodeTransformationRules struct {
- PrType string `mapstructure:"prType" json:"prType"`
- PrComponent string `mapstructure:"prComponent"
json:"prComponent"`
- PrBodyClosePattern string `mapstructure:"prBodyClosePattern"
json:"prBodyClosePattern"`
- IssueSeverity string `mapstructure:"issueSeverity"
json:"issueSeverity"`
- IssuePriority string `mapstructure:"issuePriority"
json:"issuePriority"`
- IssueComponent string `mapstructure:"issueComponent"
json:"issueComponent"`
- IssueTypeBug string `mapstructure:"issueTypeBug"
json:"issueTypeBug"`
- IssueTypeIncident string `mapstructure:"issueTypeIncident"
json:"issueTypeIncident"`
- IssueTypeRequirement string `mapstructure:"issueTypeRequirement"
json:"issueTypeRequirement"`
-}
-
-type TicketTransformationRules struct {
- EpicKeyField string `json:"epicKeyField"`
- StoryPointField string `json:"storyPointField"`
- RemotelinkCommitShaPattern string `json:"remotelinkCommitShaPattern"`
- TypeMappings map[string]struct {
- StandardType string `json:"standardType"`
- } `json:"typeMappings"`
-}
-
-// @Summary pipelines plan for jira
-// @Description pipelines plan for jira
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline-plan body JiraPipelinePlan true "json"
-// @Router /pipelines/jira/pipeline-plan [post]
-func PostJiraPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput,
error) {
- pipeline := &JiraPipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type JiraPipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Subtasks []string `json:"subtasks"`
- Options struct {
- BoardID int `json:"boardId"`
- ConnectionID int
`json:"connectionId"`
- TransformationRules TicketTransformationRules
`json:"transformationRules"`
- } `json:"options"`
-}
-
-// @Summary pipelines plan for gitextractor
-// @Description pipelines plan for gitextractor
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline body GitextractorPipelinePlan true "json"
-// @Router /pipelines/gitextractor/pipeline-plan [post]
-func PostGitextractorPipeline(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- pipeline := &GitextractorPipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type GitextractorPipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct {
- URL string `json:"url"`
- RepoID string `json:"repoId"`
- } `json:"options"`
-}
-
-// @Summary pipelines plan for gitee
-// @Description pipelines plan for gitee
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline body GiteePipelinePlan true "json"
-// @Router /pipelines/gitee/pipeline-plan [post]
-func PostGiteePipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput,
error) {
- pipeline := &GiteePipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type GiteePipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Subtasks []string `json:"subtasks"`
- Options struct {
- ConnectionID int `json:"connectionId"`
- Owner string `json:"owner"`
- Repo string `json:"repo"`
- Since string
- Transformation CodeTransformationRules `json:"transformation"`
- } `json:"options"`
-}
-
-// @Summary pipelines plan for feishu
-// @Description pipelines plan for feishu
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline body FeishuPipelinePlan true "json"
-// @Router /pipelines/feishu/pipeline-plan [post]
-func PostFeishuPipeline(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- pipeline := &FeishuPipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type FeishuPipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct{} `json:"options"`
-}
-
-// @Summary pipelines plan for dbt
-// @Description pipelines plan for dbt
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline body DbtPipelinePlan true "json"
-// @Router /pipelines/dbt/pipeline-plan [post]
-func PostDbtPipeline(input *core.ApiResourceInput) (*core.ApiResourceOutput,
error) {
- pipeline := &DbtPipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type DbtPipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Options struct {
- ProjectPath string `json:"projectPath"`
- ProjectName string `json:"projectName"`
- ProjectTarget string `json:"projectTarget"`
- SelectedModels []string `json:"selectedModels"`
- ProjectVars struct {
- Demokey1 string `json:"demokey1"`
- Demokey2 string `json:"demokey2"`
- } `json:"projectVars"`
- } `json:"options"`
-}
-
-// @Summary pipelines plan for github
-// @Description pipelines plan for github
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline body GithubPipelinePlan true "json"
-// @Router /pipelines/github/pipeline-plan [post]
-func PostGithubPipeline(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- pipeline := &GithubPipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type GithubPipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Subtasks []string `json:"subtasks"`
- Options struct {
- ConnectionID int `json:"connectionId"`
- Owner string `json:"owner"`
- Repo string `json:"repo"`
- Since string
- Transformation CodeTransformationRules `json:"transformation"`
- } `json:"options"`
-}
-
-// @Summary pipelines plan for tapd
-// @Description pipelines plan for tapd
-// @Tags framework/pipelines
-// @Accept application/json
-// @Param pipeline body TapdPipelinePlan true "json"
-// @Router /pipelines/tapd/pipeline-plan [post]
-func PostTapdPipelinePlan(input *core.ApiResourceInput)
(*core.ApiResourceOutput, error) {
- pipeline := &TapdPipelinePlan{}
- return &core.ApiResourceOutput{Body: pipeline, Status: http.StatusOK},
nil
-}
-
-type TapdPipelinePlan [][]struct {
- Plugin string `json:"plugin"`
- Subtasks []string `json:"subtasks"`
- Options struct {
- WorkspaceId uint64 `mapstruct:"workspaceId"`
- CompanyId uint64 `mapstruct:"companyId"`
- Tasks []string `mapstruct:"tasks,omitempty"`
- Since string
- } `json:"options"`
-}
diff --git a/plugins/dbt/api/swagger.go b/plugins/dbt/api/swagger.go
new file mode 100644
index 00000000..841c2870
--- /dev/null
+++ b/plugins/dbt/api/swagger.go
@@ -0,0 +1,62 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints plan for dbt
+// @Description blueprints plan for dbt
+// @Tags plugins/dbt
+// @Accept application/json
+// @Param blueprint body DbtBlueprintPlan true "json"
+// @Router /blueprints/dbt/blueprint-plan [post]
+func _() {}
+
+type DbtBlueprintPlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct {
+ ProjectPath string `json:"projectPath"`
+ ProjectName string `json:"projectName"`
+ ProjectTarget string `json:"projectTarget"`
+ SelectedModels []string `json:"selectedModels"`
+ ProjectVars struct {
+ Demokey1 string `json:"demokey1"`
+ Demokey2 string `json:"demokey2"`
+ } `json:"projectVars"`
+ } `json:"options"`
+}
+
+// @Summary pipelines plan for dbt
+// @Description pipelines plan for dbt
+// @Tags plugins/dbt
+// @Accept application/json
+// @Param pipeline body DbtPipelinePlan true "json"
+// @Router /pipelines/dbt/pipeline-plan [post]
+func _() {}
+
+type DbtPipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct {
+ ProjectPath string `json:"projectPath"`
+ ProjectName string `json:"projectName"`
+ ProjectTarget string `json:"projectTarget"`
+ SelectedModels []string `json:"selectedModels"`
+ ProjectVars struct {
+ Demokey1 string `json:"demokey1"`
+ Demokey2 string `json:"demokey2"`
+ } `json:"projectVars"`
+ } `json:"options"`
+}
diff --git a/plugins/feishu/api/swagger.go b/plugins/feishu/api/swagger.go
new file mode 100644
index 00000000..3585b72d
--- /dev/null
+++ b/plugins/feishu/api/swagger.go
@@ -0,0 +1,44 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints plan for feishu
+// @Description blueprints plan for feishu
+// @Tags plugins/feishu
+// @Accept application/json
+// @Param blueprint body FeishuBlueprintPlan true "json"
+// @Router /blueprints/feishu/blueprint-plan [post]
+func _() {}
+
+type FeishuBlueprintPlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct{} `json:"options"`
+}
+
+// @Summary pipelines plan for feishu
+// @Description pipelines plan for feishu
+// @Tags plugins/feishu
+// @Accept application/json
+// @Param pipeline body FeishuPipelinePlan true "json"
+// @Router /pipelines/feishu/pipeline-plan [post]
+func _() {}
+
+type FeishuPipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct{} `json:"options"`
+}
diff --git a/plugins/gitee/api/swagger.go b/plugins/gitee/api/swagger.go
new file mode 100644
index 00000000..d0d26fde
--- /dev/null
+++ b/plugins/gitee/api/swagger.go
@@ -0,0 +1,49 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary pipelines plan for gitee
+// @Description pipelines plan for gitee
+// @Tags plugins/gitee
+// @Accept application/json
+// @Param pipeline body GiteePipelinePlan true "json"
+// @Router /pipelines/gitee/pipeline-plan [post]
+func _() {}
+
+type CodeTransformationRules struct {
+ PrType string `mapstructure:"prType" json:"prType"`
+ PrComponent string `mapstructure:"prComponent"
json:"prComponent"`
+ PrBodyClosePattern string `mapstructure:"prBodyClosePattern"
json:"prBodyClosePattern"`
+ IssueSeverity string `mapstructure:"issueSeverity"
json:"issueSeverity"`
+ IssuePriority string `mapstructure:"issuePriority"
json:"issuePriority"`
+ IssueComponent string `mapstructure:"issueComponent"
json:"issueComponent"`
+ IssueTypeBug string `mapstructure:"issueTypeBug"
json:"issueTypeBug"`
+ IssueTypeIncident string `mapstructure:"issueTypeIncident"
json:"issueTypeIncident"`
+ IssueTypeRequirement string `mapstructure:"issueTypeRequirement"
json:"issueTypeRequirement"`
+}
+type GiteePipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Subtasks []string `json:"subtasks"`
+ Options struct {
+ ConnectionID int `json:"connectionId"`
+ Owner string `json:"owner"`
+ Repo string `json:"repo"`
+ Since string
+ Transformation CodeTransformationRules `json:"transformation"`
+ } `json:"options"`
+}
diff --git a/plugins/gitextractor/api/swagger.go
b/plugins/gitextractor/api/swagger.go
new file mode 100644
index 00000000..84d848fb
--- /dev/null
+++ b/plugins/gitextractor/api/swagger.go
@@ -0,0 +1,50 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints plan for gitextractor
+// @Description blueprints plan for gitextractor
+// @Tags plugins/gitextractor
+// @Accept application/json
+// @Param blueprint body GitextractorBlueprintPlan true "json"
+// @Router /blueprints/gitextractor/blueprint-plan [post]
+func _() {}
+
+type GitextractorBlueprintPlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct {
+ URL string `json:"url"`
+ RepoID string `json:"repoId"`
+ } `json:"options"`
+}
+
+// @Summary pipelines plan for gitextractor
+// @Description pipelines plan for gitextractor
+// @Tags plugins/gitextractor
+// @Accept application/json
+// @Param pipeline body GitextractorPipelinePlan true "json"
+// @Router /pipelines/gitextractor/pipeline-plan [post]
+func _() {}
+
+type GitextractorPipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct {
+ URL string `json:"url"`
+ RepoID string `json:"repoId"`
+ } `json:"options"`
+}
diff --git a/plugins/github/api/swagger.go b/plugins/github/api/swagger.go
new file mode 100644
index 00000000..f59a69fc
--- /dev/null
+++ b/plugins/github/api/swagger.go
@@ -0,0 +1,75 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary pipelines plan for github
+// @Description pipelines plan for github
+// @Tags plugins/github
+// @Accept application/json
+// @Param pipeline body GithubPipelinePlan true "json"
+// @Router /pipelines/github/pipeline-plan [post]
+func _() {}
+
+type GithubPipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Subtasks []string `json:"subtasks"`
+ Options struct {
+ ConnectionID int `json:"connectionId"`
+ Owner string `json:"owner"`
+ Repo string `json:"repo"`
+ Since string
+ Transformation CodeTransformationRules `json:"transformation"`
+ } `json:"options"`
+}
+
+type CodeTransformationRules struct {
+ PrType string `mapstructure:"prType" json:"prType"`
+ PrComponent string `mapstructure:"prComponent"
json:"prComponent"`
+ PrBodyClosePattern string `mapstructure:"prBodyClosePattern"
json:"prBodyClosePattern"`
+ IssueSeverity string `mapstructure:"issueSeverity"
json:"issueSeverity"`
+ IssuePriority string `mapstructure:"issuePriority"
json:"issuePriority"`
+ IssueComponent string `mapstructure:"issueComponent"
json:"issueComponent"`
+ IssueTypeBug string `mapstructure:"issueTypeBug"
json:"issueTypeBug"`
+ IssueTypeIncident string `mapstructure:"issueTypeIncident"
json:"issueTypeIncident"`
+ IssueTypeRequirement string `mapstructure:"issueTypeRequirement"
json:"issueTypeRequirement"`
+}
+
+// @Summary blueprints setting for github
+// @Description blueprint setting for github
+// @Tags plugins/github
+// @Accept application/json
+// @Param blueprint body GithubBlueprintSetting true "json"
+// @Router /blueprints/github/blueprint-setting [post]
+func _() {}
+
+type GithubBlueprintSetting []struct {
+ Version string `json:"version"`
+ Connections []struct {
+ Plugin string `json:"plugin"`
+ ConnectionID int `json:"connectionId"`
+ Scope []struct {
+ Transformation CodeTransformationRules
`json:"transformation"`
+ Options struct {
+ Owner string `json:"owner"`
+ Repo string `json:"repo"`
+ Since string
+ } `json:"options"`
+ Entities []string `json:"entities"`
+ } `json:"scope"`
+ } `json:"connections"`
+}
diff --git a/plugins/gitlab/api/swagger.go b/plugins/gitlab/api/swagger.go
new file mode 100644
index 00000000..03122a77
--- /dev/null
+++ b/plugins/gitlab/api/swagger.go
@@ -0,0 +1,54 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints setting for gitlab
+// @Description blueprint setting for gitlab
+// @Tags plugins/gitlab
+// @Accept application/json
+// @Param blueprint body GitlabBlueprintSetting true "json"
+// @Router /blueprints/gitlab/blueprint-setting [post]
+func _() {}
+
+type GitlabBlueprintSetting []struct {
+ Version string `json:"version"`
+ Connections []struct {
+ Plugin string `json:"plugin"`
+ ConnectionID int `json:"connectionId"`
+ Scope []struct {
+ Transformation CodeTransformationRules
`json:"transformation"`
+ Options struct {
+ ProjectId int `json:"projectId"`
+ Since string
+ } `json:"options"`
+ Entities []string `json:"entities"`
+ } `json:"scope"`
+ } `json:"connections"`
+}
+
+type CodeTransformationRules struct {
+ PrType string `mapstructure:"prType" json:"prType"`
+ PrComponent string `mapstructure:"prComponent"
json:"prComponent"`
+ PrBodyClosePattern string `mapstructure:"prBodyClosePattern"
json:"prBodyClosePattern"`
+ IssueSeverity string `mapstructure:"issueSeverity"
json:"issueSeverity"`
+ IssuePriority string `mapstructure:"issuePriority"
json:"issuePriority"`
+ IssueComponent string `mapstructure:"issueComponent"
json:"issueComponent"`
+ IssueTypeBug string `mapstructure:"issueTypeBug"
json:"issueTypeBug"`
+ IssueTypeIncident string `mapstructure:"issueTypeIncident"
json:"issueTypeIncident"`
+ IssueTypeRequirement string `mapstructure:"issueTypeRequirement"
json:"issueTypeRequirement"`
+}
diff --git a/plugins/icla/api/swagger.go b/plugins/icla/api/swagger.go
new file mode 100644
index 00000000..21d3f3f3
--- /dev/null
+++ b/plugins/icla/api/swagger.go
@@ -0,0 +1,45 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints setting for icla
+// @Description blueprint setting for icla
+// @Tags plugins/icla
+// @Accept application/json
+// @Param blueprint body iclaBlueprintSetting true "json"
+// @Router /blueprints/icla/blueprint-setting [post]
+func _() {}
+
+type iclaBlueprintSetting []struct {
+ Version string `json:"version" example:"1.0.0"`
+ Connections []struct {
+ Plugin string `json:"plugin" example:"icla"`
+ } `json:"connections"`
+}
+
+// @Summary pipelines plan for icla
+// @Description pipelines plan for icla
+// @Tags plugins/icla
+// @Accept application/json
+// @Param pipeline body iclaPipelinePlan true "json"
+// @Router /pipelines/icla/pipeline-plan [post]
+func _() {}
+
+type iclaPipelinePlan [][]struct {
+ Plugin string `json:"plugin" example:"icla"`
+}
diff --git a/plugins/jira/api/swagger.go b/plugins/jira/api/swagger.go
new file mode 100644
index 00000000..b27c7463
--- /dev/null
+++ b/plugins/jira/api/swagger.go
@@ -0,0 +1,69 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints setting for jira
+// @Description blueprint setting for jira
+// @Tags plugins/jira
+// @Accept application/json
+// @Param blueprint-setting body JiraBlueprintSetting true "json"
+// @Router /blueprints/jira/blueprint-setting [post]
+func _() {}
+
+type JiraBlueprintSetting []struct {
+ Version string `json:"version"`
+ Connections []struct {
+ Plugin string `json:"plugin"`
+ ConnectionID int `json:"connectionId"`
+ Scope []struct {
+ Transformation TicketTransformationRules
`json:"transformation"`
+ Options struct {
+ BoardId uint64 `json:"boardId"`
+ Since string `json:"since"`
+ } `json:"options"`
+ Entities []string `json:"entities"`
+ } `json:"scope"`
+ } `json:"connections"`
+}
+
+type TicketTransformationRules struct {
+ EpicKeyField string `json:"epicKeyField"`
+ StoryPointField string `json:"storyPointField"`
+ RemotelinkCommitShaPattern string `json:"remotelinkCommitShaPattern"`
+ TypeMappings map[string]struct {
+ StandardType string `json:"standardType"`
+ } `json:"typeMappings"`
+}
+
+// @Summary pipelines plan for jira
+// @Description pipelines plan for jira
+// @Tags plugins/jira
+// @Accept application/json
+// @Param pipeline-plan body JiraPipelinePlan true "json"
+// @Router /pipelines/jira/pipeline-plan [post]
+func _() {}
+
+type JiraPipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Subtasks []string `json:"subtasks"`
+ Options struct {
+ BoardID int `json:"boardId"`
+ ConnectionID int
`json:"connectionId"`
+ TransformationRules TicketTransformationRules
`json:"transformationRules"`
+ } `json:"options"`
+}
diff --git a/plugins/refdiff/api/swagger.go b/plugins/refdiff/api/swagger.go
new file mode 100644
index 00000000..9d703df3
--- /dev/null
+++ b/plugins/refdiff/api/swagger.go
@@ -0,0 +1,37 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+// @Summary blueprints plan for refdiff
+// @Description blueprints plan for refdiff
+// @Tags plugins/refdiff
+// @Accept application/json
+// @Param blueprint body RefdiffBlueprintPlan true "json"
+// @Router /blueprints/refdiff/blueprint-plan [post]
+func _func() {}
+
+type RefdiffBlueprintPlan [][]struct {
+ Plugin string `json:"plugin"`
+ Options struct {
+ RepoID string `json:"repoId"`
+ Pairs []struct {
+ NewRef string `json:"newRef"`
+ OldRef string `json:"oldRef"`
+ } `json:"pairs"`
+ } `json:"options"`
+}
diff --git a/plugins/tapd/api/swagger.go b/plugins/tapd/api/swagger.go
new file mode 100644
index 00000000..867d25a8
--- /dev/null
+++ b/plugins/tapd/api/swagger.go
@@ -0,0 +1,83 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package api
+
+type CodeTransformationRules struct {
+ PrType string `mapstructure:"prType" json:"prType"`
+ PrComponent string `mapstructure:"prComponent"
json:"prComponent"`
+ PrBodyClosePattern string `mapstructure:"prBodyClosePattern"
json:"prBodyClosePattern"`
+ IssueSeverity string `mapstructure:"issueSeverity"
json:"issueSeverity"`
+ IssuePriority string `mapstructure:"issuePriority"
json:"issuePriority"`
+ IssueComponent string `mapstructure:"issueComponent"
json:"issueComponent"`
+ IssueTypeBug string `mapstructure:"issueTypeBug"
json:"issueTypeBug"`
+ IssueTypeIncident string `mapstructure:"issueTypeIncident"
json:"issueTypeIncident"`
+ IssueTypeRequirement string `mapstructure:"issueTypeRequirement"
json:"issueTypeRequirement"`
+}
+
+type TicketTransformationRules struct {
+ EpicKeyField string `json:"epicKeyField"`
+ StoryPointField string `json:"storyPointField"`
+ RemotelinkCommitShaPattern string `json:"remotelinkCommitShaPattern"`
+ TypeMappings map[string]struct {
+ StandardType string `json:"standardType"`
+ } `json:"typeMappings"`
+}
+
+// @Summary blueprints setting for tapd
+// @Description blueprint setting for tapd
+// @Tags plugins/tapd
+// @Accept application/json
+// @Param blueprint body TapdBlueprintSetting true "json"
+// @Router /blueprints/tapd/blueprint-setting [post]
+func _() {}
+
+type TapdBlueprintSetting []struct {
+ Version string `json:"version"`
+ Connections []struct {
+ Plugin string `json:"plugin"`
+ ConnectionID int `json:"connectionId"`
+ Scope []struct {
+ Options struct {
+ WorkspaceId uint64 `mapstruct:"workspaceId"`
+ CompanyId uint64 `mapstruct:"companyId"`
+ Tasks []string
`mapstruct:"tasks,omitempty"`
+ Since string
+ } `json:"options"`
+ Entities []string `json:"entities"`
+ } `json:"scope"`
+ } `json:"connections"`
+}
+
+// @Summary pipelines plan for tapd
+// @Description pipelines plan for tapd
+// @Tags plugins/tapd
+// @Accept application/json
+// @Param pipeline body TapdPipelinePlan true "json"
+// @Router /pipelines/tapd/pipeline-plan [post]
+func _() {}
+
+type TapdPipelinePlan [][]struct {
+ Plugin string `json:"plugin"`
+ Subtasks []string `json:"subtasks"`
+ Options struct {
+ WorkspaceId uint64 `mapstruct:"workspaceId"`
+ CompanyId uint64 `mapstruct:"companyId"`
+ Tasks []string `mapstruct:"tasks,omitempty"`
+ Since string
+ } `json:"options"`
+}