diff --git a/api/ks-openapi-spec/swagger.json b/api/ks-openapi-spec/swagger.json index d1088f269..31f4f52dd 100644 --- a/api/ks-openapi-spec/swagger.json +++ b/api/ks-openapi-spec/swagger.json @@ -29,6 +29,12 @@ "User Resources" ] }, + { + "name": "AppStore", + "tags": [ + "Openpitrix Resources" + ] + }, { "name": "Monitoring", "tags": [ @@ -1891,7 +1897,7 @@ "operationId": "func1", "parameters": [ { - "pattern": "[*]", + "pattern": "*", "type": "string", "description": "Path stands for any suffix path.", "name": "path", @@ -7564,6 +7570,2660 @@ } } }, + "/kapis/openpitrix.io/v1/applications": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List all applications", + "operationId": "ListApplications", + "parameters": [ + { + "type": "string", + "format": "key=value,key~value", + "description": "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List app templates", + "operationId": "ListApps", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create a new app template", + "operationId": "CreateApp", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppRequest" + } + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified app template", + "operationId": "DescribeApp", + "parameters": [ + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified app template", + "operationId": "DeleteApp", + "parameters": [ + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified app template", + "operationId": "ModifyApp", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest" + } + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/action": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Perform recover or suspend operation on app", + "operationId": "DoAppAction", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/audits": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List audits information of the specific app template", + "operationId": "ListAppVersionAudits", + "parameters": [ + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionAudit" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionAudit" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/versions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get active versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all active app versions", + "operationId": "ListAppVersions", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create a new app template version", + "operationId": "CreateAppVersion", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppVersionRequest" + } + }, + { + "type": "string", + "description": "Validate format of package(pack by op tool)", + "name": "validate", + "in": "query" + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppVersionResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppVersionResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified app template version", + "operationId": "DescribeAppVersion", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified app template version", + "operationId": "DeleteAppVersion", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified app template version", + "operationId": "ModifyAppVersion", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest" + } + }, + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/action": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Perform submit or other operations on app", + "operationId": "DoAppVersionAction", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/audits": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List audits information of version-specific app template", + "operationId": "ListAppVersionAudits", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionAudit" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionAudit" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/files": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get app template package files", + "operationId": "GetAppVersionFiles", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.GetAppVersionPackageFilesResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.GetAppVersionPackageFilesResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/apps/{app}/versions/{version}/package": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get packages of version-specific app", + "operationId": "GetAppVersionPackage", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.GetAppVersionPackageResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.GetAppVersionPackageResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/attachments/{attachment}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get attachment by attachment id", + "operationId": "DescribeAttachment", + "parameters": [ + { + "type": "string", + "description": "attachment id", + "name": "attachment", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Attachment" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Attachment" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/categories": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List categories", + "operationId": "ListCategories", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create app template category", + "operationId": "CreateCategory", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateCategoryRequest" + } + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateCategoryResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateCategoryResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/categories/{category}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified category", + "operationId": "DescribeCategory", + "parameters": [ + { + "type": "string", + "description": "category id", + "name": "category", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Category" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Category" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified category", + "operationId": "DeleteCategory", + "parameters": [ + { + "type": "string", + "description": "category id", + "name": "category", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified category", + "operationId": "ModifyCategory", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyCategoryRequest" + } + }, + { + "type": "string", + "description": "category id", + "name": "category", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List repositories in the specified workspace", + "operationId": "ListRepos", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create repository in the specified workspace, repository used to store package of app", + "operationId": "CreateRepo", + "parameters": [ + { + "type": "string", + "description": "Validate repository", + "name": "validate", + "in": "query" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateRepoRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateRepoResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateRepoResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/repos/{repo}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified repository in the specified workspace", + "operationId": "DescribeRepo", + "parameters": [ + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Repo" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Repo" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified repository in the specified workspace", + "operationId": "DeleteRepo", + "parameters": [ + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified repository in the specified workspace", + "operationId": "ModifyRepo", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyRepoRequest" + } + }, + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/repos/{repo}/action": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Start index repository event", + "operationId": "DoRepoAction", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.RepoActionRequest" + } + }, + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/repos/{repo}/events": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get repository events", + "operationId": "ListRepoEvents", + "parameters": [ + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/reviews": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get reviews of version-specific app", + "operationId": "ListReviews", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionReview" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionReview" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List app templates in the specified workspace.", + "operationId": "ListApps", + "parameters": [ + { + "type": "string", + "description": "workspace name", + "name": "workspace", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create a new app template", + "operationId": "CreateApp", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppRequest" + } + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps/{app}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified app template", + "operationId": "DescribeApp", + "parameters": [ + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified app template", + "operationId": "DeleteApp", + "parameters": [ + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified app template", + "operationId": "ModifyApp", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest" + } + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps/{app}/action": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Perform recover or suspend operation on app", + "operationId": "DoAppAction", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps/{app}/versions": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get active versions of app, can filter with these fields(version_id, app_id, name, owner, description, package_name, status, type), default return all active app versions", + "operationId": "ListAppVersions", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create a new app template version", + "operationId": "CreateAppVersion", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppVersionRequest" + } + }, + { + "type": "string", + "description": "Validate format of package(pack by op tool)", + "name": "validate", + "in": "query" + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppVersionResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateAppVersionResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps/{app}/versions/{version}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified app template version", + "operationId": "DescribeAppVersion", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersion" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified app template version", + "operationId": "DeleteAppVersion", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified app template version", + "operationId": "ModifyAppVersion", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest" + } + }, + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps/{app}/versions/{version}/action": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Perform submit or other operations on app", + "operationId": "DoAppVersionAction", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/apps/{app}/versions/{version}/audits": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List audits information of version-specific app template", + "operationId": "ListAppVersionAudits", + "parameters": [ + { + "type": "string", + "description": "app template version id", + "name": "version", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "app template id", + "name": "app", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionAudit" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.AppVersionAudit" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/clusters/{cluster}/applications": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List all applications in special cluster", + "operationId": "ListApplications", + "parameters": [ + { + "type": "string", + "format": "key=value,key~value", + "description": "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/clusters/{cluster}/namespaces/{namespace}/applications": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List all applications within the specified namespace", + "operationId": "ListApplications", + "parameters": [ + { + "type": "string", + "format": "key=value,key~value", + "description": "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Deploy a new application", + "operationId": "CreateApplication", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateClusterRequest" + } + }, + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/clusters/{cluster}/namespaces/{namespace}/applications/{application}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified application of the namespace", + "operationId": "DescribeApplication", + "parameters": [ + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the id of the application", + "name": "application", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Application" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Application" + } + } + } + }, + "post": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Upgrade application", + "operationId": "UpgradeApplication", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.UpgradeClusterRequest" + } + }, + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the id of the application", + "name": "application", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified application", + "operationId": "DeleteApplication", + "parameters": [ + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the id of the application", + "name": "application", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Modify application", + "operationId": "ModifyApplication", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyClusterAttributesRequest" + } + }, + { + "type": "string", + "description": "the name of the cluster.", + "name": "cluster", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the id of the application", + "name": "application", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/namespaces/{namespace}/applications": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List all applications within the specified namespace", + "operationId": "ListApplications", + "parameters": [ + { + "type": "string", + "format": "key=value,key~value", + "description": "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "description": "the name of the project.", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/namespaces/{namespace}/applications/{application}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified application of the namespace", + "operationId": "DescribeApplication", + "parameters": [ + { + "type": "string", + "description": "the name of the project", + "name": "namespace", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the id of the application", + "name": "application", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Application" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Application" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/repos": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "List repositories in the specified workspace", + "operationId": "ListRepos", + "parameters": [ + { + "type": "string", + "format": "key=%s,key~%s", + "description": "query conditions,connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a", + "name": "conditions", + "in": "query" + }, + { + "type": "string", + "format": "limit=%d,page=%d", + "default": "limit=10,page=1", + "description": "paging query, e.g. limit=100,page=1", + "name": "paging", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. reverse=true", + "name": "reverse", + "in": "query" + }, + { + "type": "string", + "description": "sort parameters, e.g. orderBy=createTime", + "name": "orderBy", + "in": "query" + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Create repository in the specified workspace, repository used to store package of app", + "operationId": "CreateRepo", + "parameters": [ + { + "type": "string", + "description": "Validate repository", + "name": "validate", + "in": "query" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.CreateRepoRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateRepoResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.CreateRepoResponse" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/repos/{repo}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Describe the specified repository in the specified workspace", + "operationId": "DescribeRepo", + "parameters": [ + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Repo" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/openpitrix.Repo" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Delete the specified repository in the specified workspace", + "operationId": "DeleteRepo", + "parameters": [ + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + }, + "patch": { + "consumes": [ + "application/json", + "application/merge-patch+json", + "application/json-patch+json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Patch the specified repository in the specified workspace", + "operationId": "ModifyRepo", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.ModifyRepoRequest" + } + }, + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/repos/{repo}/action": { + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Start index repository event", + "operationId": "DoRepoAction", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/openpitrix.RepoActionRequest" + } + }, + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errors.Error" + } + } + } + } + }, + "/kapis/openpitrix.io/v1/workspaces/{workspace}/repos/{repo}/events": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "Openpitrix Resources" + ], + "summary": "Get repository events", + "operationId": "ListRepoEvents", + "parameters": [ + { + "type": "string", + "description": "repo id", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + }, + "default": { + "description": "ok", + "schema": { + "$ref": "#/definitions/models.PageableResponse" + } + } + } + } + }, "/kapis/operations.kubesphere.io/v1alpha2/namespaces/{namespace}/jobs/{job}": { "post": { "produces": [ @@ -11688,6 +14348,13 @@ "description": "It’s a fully qualified name and is an identifier of the producer of this resource's capability.", "type": "string" }, + "choices": { + "description": "choices", + "type": "array", + "items": { + "$ref": "#/definitions/devops.BranchPipeline.parameters.choices" + } + }, "defaultParameterValue": { "$ref": "#/definitions/.defaultParameterValue" }, @@ -11705,6 +14372,7 @@ } } }, + "devops.BranchPipeline.parameters.choices": {}, "devops.BranchPipelineRunNodes": { "properties": { "_class": { @@ -13693,6 +16361,894 @@ } }, "monitoring.Point": {}, + "openpitrix.App": { + "required": [ + "category_set" + ], + "properties": { + "abstraction": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "app_id": { + "type": "string" + }, + "app_version_types": { + "type": "string" + }, + "category_set": { + "type": "array", + "items": { + "$ref": "#/definitions/openpitrix.ResourceCategory" + } + }, + "chart_name": { + "type": "string" + }, + "cluster_total": { + "type": "integer", + "format": "int32" + }, + "company_join_time": { + "type": "string" + }, + "company_name": { + "type": "string" + }, + "company_profile": { + "type": "string" + }, + "company_website": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "description": { + "type": "string" + }, + "home": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "isv": { + "type": "string" + }, + "keywords": { + "type": "string" + }, + "latest_app_version": { + "$ref": "#/definitions/openpitrix.AppVersion" + }, + "maintainers": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "repo_id": { + "type": "string" + }, + "screenshots": { + "type": "string" + }, + "sources": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + }, + "tos": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "openpitrix.AppVersion": { + "properties": { + "active": { + "type": "boolean" + }, + "app_id": { + "type": "string" + }, + "cluster_total": { + "type": "integer", + "format": "int32" + }, + "create_time": { + "type": "string" + }, + "description": { + "type": "string" + }, + "home": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "keywords": { + "type": "string" + }, + "maintainers": { + "type": "string" + }, + "message": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "package_name": { + "type": "string" + }, + "readme": { + "type": "string" + }, + "review_id": { + "type": "string" + }, + "screenshots": { + "type": "string" + }, + "sequence": { + "type": "integer", + "format": "int64" + }, + "sources": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + }, + "type": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.AppVersionAudit": { + "properties": { + "app_id": { + "type": "string" + }, + "app_name": { + "type": "string" + }, + "message": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "operator_type": { + "type": "string" + }, + "review_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + }, + "version_id": { + "type": "string" + }, + "version_name": { + "type": "string" + }, + "version_type": { + "type": "string" + } + } + }, + "openpitrix.AppVersionReview": { + "properties": { + "app_id": { + "type": "string" + }, + "app_name": { + "type": "string" + }, + "phase": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/openpitrix.AppVersionReviewPhase" + } + }, + "review_id": { + "type": "string" + }, + "reviewer": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + }, + "version_id": { + "type": "string" + }, + "version_name": { + "type": "string" + }, + "version_type": { + "type": "string" + } + } + }, + "openpitrix.AppVersionReviewPhase": { + "properties": { + "message": { + "type": "string" + }, + "operator": { + "type": "string" + }, + "operator_type": { + "type": "string" + }, + "review_time": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + } + } + }, + "openpitrix.Application": { + "required": [ + "name" + ], + "properties": { + "app": { + "description": "application template info", + "$ref": "#/definitions/openpitrix.App" + }, + "cluster": { + "description": "application cluster info", + "$ref": "#/definitions/openpitrix.Cluster" + }, + "ingresses": { + "description": "application ingresses", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.Ingress" + } + }, + "name": { + "description": "application name", + "type": "string" + }, + "services": { + "description": "application services", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Service" + } + }, + "version": { + "description": "application template version info", + "$ref": "#/definitions/openpitrix.AppVersion" + }, + "workloads": { + "description": "application workloads", + "$ref": "#/definitions/openpitrix.workLoads" + } + } + }, + "openpitrix.Attachment": { + "properties": { + "attachment_content": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/strfmt.Base64" + } + }, + "attachment_id": { + "type": "string" + }, + "create_time": { + "type": "string" + } + } + }, + "openpitrix.Category": { + "properties": { + "app_total": { + "type": "integer", + "format": "int32" + }, + "category_id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "update_time": { + "type": "string" + } + } + }, + "openpitrix.Cluster": { + "properties": { + "additional_info": { + "type": "string" + }, + "app_id": { + "type": "string" + }, + "cluster_id": { + "type": "string" + }, + "cluster_type": { + "type": "integer", + "format": "int64" + }, + "create_time": { + "type": "string" + }, + "debug": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "endpoints": { + "type": "string" + }, + "env": { + "type": "string" + }, + "frontgate_id": { + "type": "string" + }, + "global_uuid": { + "type": "string" + }, + "metadata_root_access": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "runtime_id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + }, + "subnet_id": { + "type": "string" + }, + "transition_status": { + "type": "string" + }, + "upgrade_status": { + "type": "string" + }, + "upgrade_time": { + "type": "string" + }, + "version_id": { + "type": "string" + }, + "vpc_id": { + "type": "string" + }, + "zone": { + "type": "string" + } + } + }, + "openpitrix.CreateAppRequest": { + "properties": { + "icon": { + "type": "string" + }, + "isv": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version_name": { + "type": "string" + }, + "version_package": { + "type": "string" + }, + "version_type": { + "type": "string" + } + } + }, + "openpitrix.CreateAppResponse": { + "properties": { + "app_id": { + "type": "string" + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.CreateAppVersionRequest": { + "properties": { + "app_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "package": { + "type": "string" + }, + "type": { + "type": "string" + } + } + }, + "openpitrix.CreateAppVersionResponse": { + "properties": { + "version_id": { + "type": "string" + } + } + }, + "openpitrix.CreateCategoryRequest": { + "properties": { + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "openpitrix.CreateCategoryResponse": { + "properties": { + "category_id": { + "type": "string" + } + } + }, + "openpitrix.CreateClusterRequest": { + "required": [ + "advanced_param" + ], + "properties": { + "advanced_param": { + "type": "array", + "items": { + "type": "string" + } + }, + "app_id": { + "type": "string" + }, + "conf": { + "type": "string" + }, + "runtime_id": { + "type": "string" + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.CreateRepoRequest": { + "required": [ + "providers" + ], + "properties": { + "app_default_status": { + "type": "string" + }, + "category_id": { + "type": "string" + }, + "credential": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "providers": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "visibility": { + "type": "string" + }, + "workspace": { + "type": "string" + } + } + }, + "openpitrix.CreateRepoResponse": { + "properties": { + "repo_id": { + "type": "string" + } + } + }, + "openpitrix.GetAppVersionPackageFilesResponse": { + "properties": { + "files": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/strfmt.Base64" + } + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.GetAppVersionPackageResponse": { + "properties": { + "app_id": { + "type": "string" + }, + "package": { + "type": "string" + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.ModifyAppVersionRequest": { + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "package": { + "type": "string" + }, + "package_files": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/openpitrix.ModifyAppVersionRequest.package_files" + } + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.ModifyCategoryRequest": { + "properties": { + "description": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "openpitrix.ModifyClusterAttributesRequest": { + "properties": { + "cluster_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "openpitrix.ModifyRepoRequest": { + "required": [ + "providers" + ], + "properties": { + "app_default_status": { + "type": "string" + }, + "category_id": { + "type": "string" + }, + "credential": { + "type": "string" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "providers": { + "type": "array", + "items": { + "type": "string" + } + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "visibility": { + "type": "string" + }, + "workspace": { + "type": "string" + } + } + }, + "openpitrix.Repo": { + "required": [ + "category_set", + "labels", + "providers", + "selectors" + ], + "properties": { + "app_default_status": { + "type": "string" + }, + "category_set": { + "type": "array", + "items": { + "$ref": "#/definitions/openpitrix.ResourceCategory" + } + }, + "controller": { + "type": "integer", + "format": "int32" + }, + "create_time": { + "type": "string" + }, + "credential": { + "type": "string" + }, + "description": { + "type": "string" + }, + "labels": { + "type": "array", + "items": { + "$ref": "#/definitions/openpitrix.RepoLabel" + } + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "providers": { + "type": "array", + "items": { + "type": "string" + } + }, + "repo_id": { + "type": "string" + }, + "selectors": { + "type": "array", + "items": { + "$ref": "#/definitions/openpitrix.RepoSelector" + } + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + }, + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "visibility": { + "type": "string" + } + } + }, + "openpitrix.RepoActionRequest": { + "required": [ + "action" + ], + "properties": { + "action": { + "type": "string" + } + } + }, + "openpitrix.RepoLabel": { + "properties": { + "create_time": { + "type": "string" + }, + "label_key": { + "type": "string" + }, + "label_value": { + "type": "string" + } + } + }, + "openpitrix.RepoSelector": { + "properties": { + "create_time": { + "type": "string" + }, + "selector_key": { + "type": "string" + }, + "selector_value": { + "type": "string" + } + } + }, + "openpitrix.ResourceCategory": { + "properties": { + "category_id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "status_time": { + "type": "string" + } + } + }, + "openpitrix.UpgradeClusterRequest": { + "required": [ + "cluster_id", + "advanced_param" + ], + "properties": { + "advanced_param": { + "type": "array", + "items": { + "type": "string" + } + }, + "cluster_id": { + "type": "string" + }, + "conf": { + "type": "string" + }, + "runtime_id": { + "type": "string" + }, + "version_id": { + "type": "string" + } + } + }, + "openpitrix.workLoads": { + "properties": { + "daemonsets": { + "description": "daemonset list", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DaemonSet" + } + }, + "deployments": { + "description": "deployment list", + "type": "array", + "items": { + "$ref": "#/definitions/v1.Deployment" + } + }, + "statefulsets": { + "description": "statefulset list", + "type": "array", + "items": { + "$ref": "#/definitions/v1.StatefulSet" + } + } + } + }, "prometheus.Metric": { "required": [ "matrix", @@ -14766,6 +18322,169 @@ } } }, + "v1.Deployment": { + "description": "Deployment enables declarative updates for Pods and ReplicaSets.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object metadata.", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Specification of the desired behavior of the Deployment.", + "$ref": "#/definitions/v1.DeploymentSpec" + }, + "status": { + "description": "Most recently observed status of the Deployment.", + "$ref": "#/definitions/v1.DeploymentStatus" + } + } + }, + "v1.DeploymentCondition": { + "description": "DeploymentCondition describes the state of a deployment at a certain point.", + "required": [ + "type", + "status" + ], + "properties": { + "lastTransitionTime": { + "description": "Last time the condition transitioned from one status to another.", + "type": "string" + }, + "lastUpdateTime": { + "description": "The last time this condition was updated.", + "type": "string" + }, + "message": { + "description": "A human readable message indicating details about the transition.", + "type": "string" + }, + "reason": { + "description": "The reason for the condition's last transition.", + "type": "string" + }, + "status": { + "description": "Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Type of deployment condition.", + "type": "string" + } + } + }, + "v1.DeploymentSpec": { + "description": "DeploymentSpec is the specification of the desired behavior of the Deployment.", + "required": [ + "selector", + "template" + ], + "properties": { + "minReadySeconds": { + "description": "Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", + "type": "integer", + "format": "int32" + }, + "paused": { + "description": "Indicates that the deployment is paused.", + "type": "boolean" + }, + "progressDeadlineSeconds": { + "description": "The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.", + "type": "integer", + "format": "int32" + }, + "revisionHistoryLimit": { + "description": "The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.", + "type": "integer", + "format": "int32" + }, + "selector": { + "description": "Label selector for pods. Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template's labels.", + "$ref": "#/definitions/v1.LabelSelector" + }, + "strategy": { + "description": "The deployment strategy to use to replace existing pods with new ones.", + "$ref": "#/definitions/v1.DeploymentStrategy" + }, + "template": { + "description": "Template describes the pods that will be created.", + "$ref": "#/definitions/v1.PodTemplateSpec" + } + } + }, + "v1.DeploymentStatus": { + "description": "DeploymentStatus is the most recently observed status of the Deployment.", + "properties": { + "availableReplicas": { + "description": "Total number of available pods (ready for at least minReadySeconds) targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "collisionCount": { + "description": "Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.", + "type": "integer", + "format": "int32" + }, + "conditions": { + "description": "Represents the latest available observations of a deployment's current state.", + "type": "array", + "items": { + "$ref": "#/definitions/v1.DeploymentCondition" + } + }, + "observedGeneration": { + "description": "The generation observed by the deployment controller.", + "type": "integer", + "format": "int64" + }, + "readyReplicas": { + "description": "Total number of ready pods targeted by this deployment.", + "type": "integer", + "format": "int32" + }, + "replicas": { + "description": "Total number of non-terminated pods targeted by this deployment (their labels match the selector).", + "type": "integer", + "format": "int32" + }, + "unavailableReplicas": { + "description": "Total number of unavailable pods targeted by this deployment. This is the total number of pods that are still required for the deployment to have 100% available capacity. They may either be pods that are running but not yet available or pods that still have not been created.", + "type": "integer", + "format": "int32" + }, + "updatedReplicas": { + "description": "Total number of non-terminated pods targeted by this deployment that have the desired template spec.", + "type": "integer", + "format": "int32" + } + } + }, + "v1.DeploymentStrategy": { + "description": "DeploymentStrategy describes how to replace existing pods with new ones.", + "properties": { + "rollingUpdate": { + "description": "Rolling update config params. Present only if DeploymentStrategyType = RollingUpdate.", + "$ref": "#/definitions/v1.RollingUpdateDeployment" + }, + "type": { + "description": "Type of deployment. Can be \"Recreate\" or \"RollingUpdate\". Default is RollingUpdate.", + "type": "string" + } + } + }, "v1.DownwardAPIProjection": { "description": "Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.", "properties": { @@ -16863,6 +20582,19 @@ } } }, + "v1.RollingUpdateDeployment": { + "description": "Spec to control the desired behavior of rolling update.", + "properties": { + "maxSurge": { + "description": "The maximum number of pods that can be scheduled above the desired number of pods. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.", + "type": "string" + }, + "maxUnavailable": { + "description": "The maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.", + "type": "string" + } + } + }, "v1.RollingUpdateStatefulSetStrategy": { "description": "RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.", "properties": { @@ -18222,10 +21954,10 @@ }, "v1alpha2.Node": { "required": [ + "labelMinor", + "rank", "id", "label", - "rank", - "labelMinor", "controls" ], "properties": { @@ -18333,10 +22065,10 @@ }, "v1alpha2.NodeSummary": { "required": [ - "labelMinor", - "rank", "id", - "label" + "label", + "labelMinor", + "rank" ], "properties": { "adjacency": { @@ -18654,8 +22386,8 @@ }, "v1alpha2.appHealthResponse": { "required": [ - "workloadStatuses", - "requests" + "requests", + "workloadStatuses" ], "properties": { "requests": { @@ -18671,10 +22403,10 @@ }, "v1alpha2.graphResponse": { "required": [ + "timestamp", "duration", "graphType", - "elements", - "timestamp" + "elements" ], "properties": { "duration": { @@ -18738,8 +22470,8 @@ }, "v1alpha2.workloadHealthResponse": { "required": [ - "workloadStatus", - "requests" + "requests", + "workloadStatus" ], "properties": { "requests": { @@ -19254,6 +22986,139 @@ } } }, + "v1beta1.HTTPIngressPath": { + "description": "HTTPIngressPath associates a path regex with a backend. Incoming urls matching the path are forwarded to the backend.", + "required": [ + "backend" + ], + "properties": { + "backend": { + "description": "Backend defines the referenced service endpoint to which the traffic will be forwarded to.", + "$ref": "#/definitions/v1beta1.IngressBackend" + }, + "path": { + "description": "Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional \"path\" part of a URL as defined by RFC 3986. Paths must begin with a '/'. If unspecified, the path defaults to a catch all sending traffic to the backend.", + "type": "string" + } + } + }, + "v1beta1.HTTPIngressRuleValue": { + "description": "HTTPIngressRuleValue is a list of http selectors pointing to backends. In the example: http://\u003chost\u003e/\u003cpath\u003e?\u003csearchpart\u003e -\u003e backend where where parts of the url correspond to RFC 3986, this resource will be used to match against everything after the last '/' and before the first '?' or '#'.", + "required": [ + "paths" + ], + "properties": { + "paths": { + "description": "A collection of paths that map requests to backends.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.HTTPIngressPath" + } + } + } + }, + "v1beta1.Ingress": { + "description": "Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend. An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc. DEPRECATED - This group version of Ingress is deprecated by networking.k8s.io/v1beta1 Ingress. See the release notes for more information.", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "description": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "$ref": "#/definitions/v1.ObjectMeta" + }, + "spec": { + "description": "Spec is the desired state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.IngressSpec" + }, + "status": { + "description": "Status is the current state of the Ingress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", + "$ref": "#/definitions/v1beta1.IngressStatus" + } + } + }, + "v1beta1.IngressBackend": { + "description": "IngressBackend describes all endpoints for a given service and port.", + "required": [ + "serviceName", + "servicePort" + ], + "properties": { + "serviceName": { + "description": "Specifies the name of the referenced service.", + "type": "string" + }, + "servicePort": { + "description": "Specifies the port of the referenced service.", + "type": "string" + } + } + }, + "v1beta1.IngressRule": { + "description": "IngressRule represents the rules mapping the paths under a specified host to the related backend services. Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.", + "properties": { + "host": { + "description": "Host is the fully qualified domain name of a network host, as defined by RFC 3986. Note the following deviations from the \"host\" part of the URI as defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to the\n\t IP in the Spec of the parent Ingress.\n2. The `:` delimiter is not respected because ports are not allowed.\n\t Currently the port of an Ingress is implicitly :80 for http and\n\t :443 for https.\nBoth these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.", + "type": "string" + }, + "http": { + "$ref": "#/definitions/v1beta1.HTTPIngressRuleValue" + } + } + }, + "v1beta1.IngressSpec": { + "description": "IngressSpec describes the Ingress the user wishes to exist.", + "properties": { + "backend": { + "description": "A default backend capable of servicing requests that don't match any rule. At least one of 'backend' or 'rules' must be specified. This field is optional to allow the loadbalancer controller or defaulting logic to specify a global default.", + "$ref": "#/definitions/v1beta1.IngressBackend" + }, + "rules": { + "description": "A list of host rules used to configure the Ingress. If unspecified, or no rule matches, all traffic is sent to the default backend.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IngressRule" + } + }, + "tls": { + "description": "TLS configuration. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.", + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1.IngressTLS" + } + } + } + }, + "v1beta1.IngressStatus": { + "description": "IngressStatus describe the current state of the Ingress.", + "properties": { + "loadBalancer": { + "description": "LoadBalancer contains the current status of the load-balancer.", + "$ref": "#/definitions/v1.LoadBalancerStatus" + } + } + }, + "v1beta1.IngressTLS": { + "description": "IngressTLS describes the transport layer security associated with an Ingress.", + "properties": { + "hosts": { + "description": "Hosts are a list of hosts included in the TLS certificate. The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.", + "type": "array", + "items": { + "type": "string" + } + }, + "secretName": { + "description": "SecretName is the name of the secret used to terminate SSL traffic on 443. Field is left optional to allow SSL routing based on SNI hostname alone. If the SNI host in a listener conflicts with the \"Host\" header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.", + "type": "string" + } + } + }, "v1beta1.WorkspaceTemplate": { "description": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", "properties": { diff --git a/pkg/kapis/openpitrix/v1/register.go b/pkg/kapis/openpitrix/v1/register.go index bc6728e46..fa80012c4 100644 --- a/pkg/kapis/openpitrix/v1/register.go +++ b/pkg/kapis/openpitrix/v1/register.go @@ -36,9 +36,6 @@ const ( var GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} func AddToContainer(c *restful.Container, factory informers.InformerFactory, op op.Client) error { - if op == nil { - return nil - } mimePatch := []string{restful.MIME_JSON, runtime.MimeMergePatchJson, runtime.MimeJsonPatchJson} webservice := runtime.NewWebService(GroupVersion) handler := newOpenpitrixHandler(factory, op) @@ -46,7 +43,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.GET("/applications"). To(handler.ListApplications). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Doc("List all applications"). Param(webservice.QueryParameter(params.ConditionsParam, "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a"). Required(false). @@ -60,7 +57,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.GET("/workspaces/{workspace}/namespaces/{namespace}/applications"). To(handler.ListApplications). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Doc("List all applications within the specified namespace"). Param(webservice.QueryParameter(params.ConditionsParam, "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a"). Required(false). @@ -75,7 +72,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.GET("/workspaces/{workspace}/namespaces/{namespace}/applications/{application}"). To(handler.DescribeApplication). Returns(http.StatusOK, api.StatusOK, openpitrix2.Application{}). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Doc("Describe the specified application of the namespace"). Param(webservice.PathParameter("namespace", "the name of the project").Required(true)). Param(webservice.PathParameter("application", "the id of the application").Required(true))) @@ -83,7 +80,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.GET("/workspaces/{workspace}/clusters/{cluster}/applications"). To(handler.ListApplications). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Doc("List all applications in special cluster"). Param(webservice.QueryParameter(params.ConditionsParam, "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a"). Required(false). @@ -98,7 +95,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.GET("/workspaces/{workspace}/clusters/{cluster}/namespaces/{namespace}/applications"). To(handler.ListApplications). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Doc("List all applications within the specified namespace"). Param(webservice.QueryParameter(params.ConditionsParam, "query conditions, connect multiple conditions with commas, equal symbol for exact query, wave symbol for fuzzy query e.g. name~a"). Required(false). @@ -114,7 +111,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.GET("/workspaces/{workspace}/clusters/{cluster}/namespaces/{namespace}/applications/{application}"). To(handler.DescribeApplication). Returns(http.StatusOK, api.StatusOK, openpitrix2.Application{}). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Doc("Describe the specified application of the namespace"). Param(webservice.PathParameter("cluster", "the name of the cluster.").Required(true)). Param(webservice.PathParameter("namespace", "the name of the project").Required(true)). @@ -123,7 +120,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.POST("/workspaces/{workspace}/clusters/{cluster}/namespaces/{namespace}/applications"). To(handler.CreateApplication). Doc("Deploy a new application"). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Reads(openpitrix2.CreateClusterRequest{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("cluster", "the name of the cluster.").Required(true)). @@ -133,7 +130,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op Consumes(mimePatch...). To(handler.ModifyApplication). Doc("Modify application"). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Reads(openpitrix2.ModifyClusterAttributesRequest{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("cluster", "the name of the cluster.").Required(true)). @@ -143,7 +140,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.DELETE("/workspaces/{workspace}/clusters/{cluster}/namespaces/{namespace}/applications/{application}"). To(handler.DeleteApplication). Doc("Delete the specified application"). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("cluster", "the name of the cluster.").Required(true)). Param(webservice.PathParameter("namespace", "the name of the project").Required(true)). @@ -153,7 +150,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op Consumes(mimePatch...). To(handler.UpgradeApplication). Doc("Upgrade application"). - Metadata(restfulspec.KeyOpenAPITags, []string{constants.NamespaceResourcesTag}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Reads(openpitrix2.UpgradeClusterRequest{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("cluster", "the name of the cluster.").Required(true)). @@ -228,6 +225,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op Param(webservice.PathParameter("app", "app template id")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.GET("/workspaces/{workspace}/apps/{app}/versions/{version}"). To(handler.DescribeAppVersion). @@ -249,16 +247,19 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op Param(webservice.PathParameter("app", "app template id")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.GET("/workspaces/{workspace}/apps/{app}/versions/{version}/audits"). To(handler.ListAppVersionAudits). Doc("List audits information of version-specific app template"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersionAudit{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) webservice.Route(webservice.GET("/apps/{app}/versions/{version}/audits"). To(handler.ListAppVersionAudits). Doc("List audits information of version-specific app template"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersionAudit{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) @@ -266,23 +267,27 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op To(handler.GetAppVersionPackage). Doc("Get packages of version-specific app"). Returns(http.StatusOK, api.StatusOK, openpitrix2.GetAppVersionPackageResponse{}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) webservice.Route(webservice.POST("/apps/{app}/versions/{version}/action"). To(handler.DoAppVersionAction). Doc("Perform submit or other operations on app"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/versions/{version}/action"). To(handler.DoAppVersionAction). Doc("Perform submit or other operations on app"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) webservice.Route(webservice.GET("/apps/{app}/versions/{version}/files"). To(handler.GetAppVersionFiles). Doc("Get app template package files"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, openpitrix2.GetAppVersionPackageFilesResponse{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) @@ -296,11 +301,13 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op Required(false). DataFormat("limit=%d,page=%d"). DefaultValue("limit=10,page=1")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersionReview{})) webservice.Route(webservice.GET("/apps/{app}/audits"). To(handler.ListAppVersionAudits). Doc("List audits information of the specific app template"). Param(webservice.PathParameter("app", "app template id")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, openpitrix2.AppVersionAudit{})) webservice.Route(webservice.POST("/apps"). To(handler.CreateApp). @@ -359,12 +366,14 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op webservice.Route(webservice.POST("/apps/{app}/action"). To(handler.DoAppAction). Doc("Perform recover or suspend operation on app"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) webservice.Route(webservice.POST("/workspaces/{workspace}/apps/{app}/action"). To(handler.DoAppAction). Doc("Perform recover or suspend operation on app"). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). Param(webservice.PathParameter("version", "app template version id")). Param(webservice.PathParameter("app", "app template id"))) @@ -380,6 +389,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op DefaultValue("limit=10,page=1")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.GET("/workspaces/{workspace}/apps"). To(handler.ListApps). @@ -394,6 +404,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op DefaultValue("limit=10,page=1")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.POST("/categories"). To(handler.CreateCategory). @@ -434,12 +445,14 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op DefaultValue("limit=10,page=1")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.GET("/attachments/{attachment}"). To(handler.DescribeAttachment). Doc("Get attachment by attachment id"). Param(webservice.PathParameter("attachment", "attachment id")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, openpitrix2.Attachment{})) webservice.Route(webservice.POST("/repos"). @@ -507,6 +520,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op DataFormat("limit=%d,page=%d"). DefaultValue("limit=10,page=1")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.GET("/workspaces/{workspace}/repos"). @@ -521,6 +535,7 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op DefaultValue("limit=10,page=1")). Param(webservice.QueryParameter(params.ReverseParam, "sort parameters, e.g. reverse=true")). Param(webservice.QueryParameter(params.OrderByParam, "sort parameters, e.g. orderBy=createTime")). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{})) webservice.Route(webservice.POST("/repos/{repo}/action"). @@ -528,22 +543,26 @@ func AddToContainer(c *restful.Container, factory informers.InformerFactory, op Doc("Start index repository event"). Reads(openpitrix2.RepoActionRequest{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Param(webservice.PathParameter("repo", "repo id"))) webservice.Route(webservice.POST("/workspaces/{workspace}/repos/{repo}/action"). To(handler.DoRepoAction). Doc("Start index repository event"). Reads(openpitrix2.RepoActionRequest{}). Returns(http.StatusOK, api.StatusOK, errors.Error{}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Param(webservice.PathParameter("repo", "repo id"))) webservice.Route(webservice.GET("/repos/{repo}/events"). To(handler.ListRepoEvents). Doc("Get repository events"). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Param(webservice.PathParameter("repo", "repo id"))) webservice.Route(webservice.GET("/workspaces/{workspace}/repos/{repo}/events"). To(handler.ListRepoEvents). Doc("Get repository events"). Returns(http.StatusOK, api.StatusOK, models.PageableResponse{}). + Metadata(restfulspec.KeyOpenAPITags, []string{constants.OpenpitrixTag}). Param(webservice.PathParameter("repo", "repo id"))) c.Add(webservice) diff --git a/tools/cmd/doc-gen/main.go b/tools/cmd/doc-gen/main.go index 19b785b75..264857c86 100644 --- a/tools/cmd/doc-gen/main.go +++ b/tools/cmd/doc-gen/main.go @@ -143,6 +143,10 @@ func generateSwaggerJson() []byte { Name: "Resources", Tags: []string{constants.ClusterResourcesTag, constants.NamespaceResourcesTag, constants.UserResourcesTag}, }, + { + Name: "AppStore", + Tags: []string{constants.OpenpitrixTag}, + }, { Name: "Monitoring", Tags: []string{constants.ComponentStatusTag},