From cb87f4988ddb61728b7d12bf887976d0ac22ab0a Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Mon, 26 Jun 2023 11:15:50 +0900 Subject: [PATCH 1/4] app-serving: update swagger spec --- internal/delivery/http/app-serve-app.go | 46 ++++++++++++++++--------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/internal/delivery/http/app-serve-app.go b/internal/delivery/http/app-serve-app.go index 1f4c9118..493c2db9 100644 --- a/internal/delivery/http/app-serve-app.go +++ b/internal/delivery/http/app-serve-app.go @@ -79,7 +79,8 @@ func NewAppServeAppHandler(h usecase.IAppServeAppUsecase) *AppServeAppHandler { // @Description Install appServeApp // @Accept json // @Produce json -// @Param object body domain.CreateAppServeAppRequest true "create appserve request" +// @Param organizationId path string true "Organization ID" +// @Param object body domain.CreateAppServeAppRequest true "Request body to create app" // @Success 200 {object} string // @Router /organizations/{organizationId}/app-serve-apps [post] // @Security JWT @@ -163,8 +164,8 @@ func (h *AppServeAppHandler) CreateAppServeApp(w http.ResponseWriter, r *http.Re // @Description Get appServeApp list by giving params // @Accept json // @Produce json -// @Param organization_Id query string false "organization_Id" -// @Param showAll query string false "show_all" +// @Param organizationId path string true "Organization ID" +// @Param showAll query boolean false "Show all apps including deleted apps" // @Success 200 {object} []domain.AppServeApp // @Router /organizations/{organizationId}/app-serve-apps [get] // @Security JWT @@ -210,6 +211,8 @@ func (h *AppServeAppHandler) GetAppServeApps(w http.ResponseWriter, r *http.Requ // @Description Get appServeApp by giving params // @Accept json // @Produce json +// @Param organizationId path string true "Organization ID" +// @Param appId path string true "App ID" // @Success 200 {object} domain.GetAppServeAppResponse // @Router /organizations/{organizationId}/app-serve-apps/{appId} [get] // @Security JWT @@ -264,6 +267,8 @@ func (h *AppServeAppHandler) GetAppServeApp(w http.ResponseWriter, r *http.Reque // @Description Get latest task from appServeApp // @Accept json // @Produce json +// @Param organizationId path string true "Organization ID" +// @Param appId path string true "App ID" // @Success 200 {object} domain.GetAppServeAppTaskResponse // @Router /organizations/{organizationId}/app-serve-apps/{appId}/latest-task [get] // @Security JWT @@ -305,6 +310,8 @@ func (h *AppServeAppHandler) GetAppServeAppLatestTask(w http.ResponseWriter, r * // @Description Get number of apps on given stack // @Accept json // @Produce json +// @Param organizationId path string true "Organization ID" +// @Param stackId query string true "Stack ID" // @Success 200 {object} int64 // @Router /organizations/{organizationId}/app-serve-apps/count [get] // @Security JWT @@ -453,7 +460,7 @@ func makeStage(app *domain.AppServeApp, pl string) domain.StageResponse { // @Accept json // @Produce json // @Success 200 {object} bool -// @Router /organizations/{organizationId}/app-serve-apps/app-id/exist [get] +// @Router /organizations/{organizationId}/app-serve-apps/{appId}/exist [get] // @Security JWT func (h *AppServeAppHandler) IsAppServeAppExist(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) @@ -491,7 +498,7 @@ func (h *AppServeAppHandler) IsAppServeAppExist(w http.ResponseWriter, r *http.R // @Description Check duplicate appServeAppName by giving params // @Accept json // @Produce json -// @Param organizationId path string true "organizationId" +// @Param organizationId path string true "Organization ID" // @Param name path string true "name" // @Success 200 {object} bool // @Router /organizations/{organizationId}/app-serve-apps/name/{name}/existence [get] @@ -530,8 +537,10 @@ func (h *AppServeAppHandler) IsAppServeAppNameExist(w http.ResponseWriter, r *ht // @Description Update appServeApp // @Accept json // @Produce json -// @Param object body domain.UpdateAppServeAppRequest true "update appserve request" -// @Success 200 {object} object +// @Param organizationId path string true "Organization ID" +// @Param appId path string true "App ID" +// @Param object body domain.UpdateAppServeAppRequest true "Request body to update app" +// @Success 200 {object} string // @Router /organizations/{organizationId}/app-serve-apps/{appId} [put] // @Security JWT func (h *AppServeAppHandler) UpdateAppServeApp(w http.ResponseWriter, r *http.Request) { @@ -637,9 +646,10 @@ func (h *AppServeAppHandler) UpdateAppServeApp(w http.ResponseWriter, r *http.Re // @Description Update app status // @Accept json // @Produce json -// @Param appId path string true "appId" -// @Param body body domain.UpdateAppServeAppStatusRequest true "update app status request" -// @Success 200 {object} object +// @Param organizationId path string true "Organization ID" +// @Param appId path string true "App ID" +// @Param body body domain.UpdateAppServeAppStatusRequest true "Request body to update app status" +// @Success 200 {object} string // @Router /organizations/{organizationId}/app-serve-apps/{appId}/status [patch] // @Security JWT func (h *AppServeAppHandler) UpdateAppServeAppStatus(w http.ResponseWriter, r *http.Request) { @@ -679,9 +689,10 @@ func (h *AppServeAppHandler) UpdateAppServeAppStatus(w http.ResponseWriter, r *h // @Description Update app endpoint // @Accept json // @Produce json +// @Param organizationId path string true "Organization ID" // @Param appId path string true "appId" -// @Param body body domain.UpdateAppServeAppEndpointRequest true "update app endpoint request" -// @Success 200 {object} object +// @Param body body domain.UpdateAppServeAppEndpointRequest true "Request body to update app endpoint" +// @Success 200 {object} string // @Router /organizations/{organizationId}/app-serve-apps/{appId}/endpoint [patch] // @Security JWT func (h *AppServeAppHandler) UpdateAppServeAppEndpoint(w http.ResponseWriter, r *http.Request) { @@ -726,8 +737,9 @@ func (h *AppServeAppHandler) UpdateAppServeAppEndpoint(w http.ResponseWriter, r // @Description Uninstall appServeApp // @Accept json // @Produce json -// @Param object body string true "body" -// @Success 200 {object} object +// @Param organizationId path string true "Organization ID" +// @Param appId path string true "App ID" +// @Success 200 {object} string // @Router /organizations/{organizationId}/app-serve-apps/{appId} [delete] // @Security JWT func (h *AppServeAppHandler) DeleteAppServeApp(w http.ResponseWriter, r *http.Request) { @@ -761,8 +773,10 @@ func (h *AppServeAppHandler) DeleteAppServeApp(w http.ResponseWriter, r *http.Re // @Description Rollback appServeApp // @Accept json // @Produce json -// @Param object body domain.RollbackAppServeAppRequest true "rollback appserve request" -// @Success 200 {object} object +// @Param organizationId path string true "Organization ID" +// @Param appId path string true "App ID" +// @Param object body domain.RollbackAppServeAppRequest true "Request body to rollback app" +// @Success 200 {object} string // @Router /organizations/{organizationId}/app-serve-apps/{appId}/rollback [post] // @Security JWT func (h *AppServeAppHandler) RollbackAppServeApp(w http.ResponseWriter, r *http.Request) { From 7f0b18d3f423438a0f0bf2c082f4ecc69cdadd09 Mon Sep 17 00:00:00 2001 From: Robert Choi Date: Mon, 26 Jun 2023 11:29:07 +0900 Subject: [PATCH 2/4] app-serving: add validation for stackId param --- internal/delivery/http/app-serve-app.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/delivery/http/app-serve-app.go b/internal/delivery/http/app-serve-app.go index 493c2db9..39656c0d 100644 --- a/internal/delivery/http/app-serve-app.go +++ b/internal/delivery/http/app-serve-app.go @@ -327,6 +327,9 @@ func (h *AppServeAppHandler) GetNumOfAppsOnStack(w http.ResponseWriter, r *http. urlParams := r.URL.Query() stackId := urlParams.Get("stackId") + if stackId == "" { + ErrorJSON(w, r, httpErrors.NewBadRequestError(fmt.Errorf("StackId must be provided."), "", "")) + } fmt.Printf("stackId = [%s]\n", stackId) numApps, err := h.usecase.GetNumOfAppsOnStack(organizationId, stackId) From c1168cee318e7c595f3d6d88ba4e6477a5802c17 Mon Sep 17 00:00:00 2001 From: Taekyu Date: Mon, 26 Jun 2023 14:35:11 +0900 Subject: [PATCH 3/4] feature. fix github action for gitflow --- .github/workflows/build-and-push.yml | 4 ++++ .github/workflows/build.yml | 3 ++- .github/workflows/lint.yml | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index ee74c6a7..f943a8d4 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -4,6 +4,9 @@ on: branches: - main - develop + - release + workflow_dispatch: + env: SERVICE: tks-api TAG: ${{github.sha}} @@ -44,6 +47,7 @@ jobs: if [[ ${{github.ref}} == *"develop"* ]]; then ( cd cicd-manifests/${SERVICE}/overlay/development && kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG} && git add kustomization.yaml ) + elif [[ ${{github.ref}} == *"release"* ]]; then ( cd cicd-manifests/${SERVICE}/overlay/ft && kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG} && git add kustomization.yaml ) elif [[ ${{github.ref}} == *"main"* ]]; then ( cd cicd-manifests/${SERVICE}/overlay/cicd && kustomize edit set image docker.io/sktcloud/${SERVICE}:${TAG} && git add kustomization.yaml ) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 858deeff..e8644715 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,10 @@ -name: Build image +name: Build Image on: pull_request_target: branches: - main - develop + - release env: SERVICE: tks-api diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index deccaf17..5df838e9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: golangci-lint +name: Lint on: push: tags: @@ -6,12 +6,12 @@ on: branches: - main - develop - - "release**" + - release pull_request: branches: - main - develop - - "release**" + - release jobs: golangci: name: lint From 9903a63ace479eeb7ae966c5251e4aa9738824e6 Mon Sep 17 00:00:00 2001 From: Taekyu Date: Mon, 26 Jun 2023 14:36:25 +0900 Subject: [PATCH 4/4] trivial. build swagger docs --- api/swagger/docs.go | 207 +++++++++++++++++++++++++++++---------- api/swagger/swagger.json | 207 +++++++++++++++++++++++++++++---------- api/swagger/swagger.yaml | 151 ++++++++++++++++++++-------- 3 files changed, 422 insertions(+), 143 deletions(-) diff --git a/api/swagger/docs.go b/api/swagger/docs.go index c7739f2b..b9d06719 100644 --- a/api/swagger/docs.go +++ b/api/swagger/docs.go @@ -1046,13 +1046,14 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "organization_Id", - "name": "organization_Id", - "in": "query" + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true }, { - "type": "string", - "description": "show_all", + "type": "boolean", + "description": "Show all apps including deleted apps", "name": "showAll", "in": "query" } @@ -1088,7 +1089,14 @@ const docTemplate = `{ "summary": "Install appServeApp", "parameters": [ { - "description": "create appserve request", + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "description": "Request body to create app", "name": "object", "in": "body", "required": true, @@ -1107,34 +1115,6 @@ const docTemplate = `{ } } }, - "/organizations/{organizationId}/app-serve-apps/app-id/exist": { - "get": { - "security": [ - { - "JWT": [] - } - ], - "description": "Get appServeApp by giving params", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "AppServeApps" - ], - "summary": "Get appServeApp", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - } - } - }, "/organizations/{organizationId}/app-serve-apps/count": { "get": { "security": [ @@ -1153,6 +1133,22 @@ const docTemplate = `{ "AppServeApps" ], "summary": "Get number of apps on given stack", + "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Stack ID", + "name": "stackId", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -1184,7 +1180,7 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "organizationId", + "description": "Organization ID", "name": "organizationId", "in": "path", "required": true @@ -1225,6 +1221,22 @@ const docTemplate = `{ "AppServeApps" ], "summary": "Get appServeApp", + "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -1253,7 +1265,21 @@ const docTemplate = `{ "summary": "Update appServeApp", "parameters": [ { - "description": "update appserve request", + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + }, + { + "description": "Request body to update app", "name": "object", "in": "body", "required": true, @@ -1266,7 +1292,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } @@ -1290,20 +1316,25 @@ const docTemplate = `{ "summary": "Uninstall appServeApp", "parameters": [ { - "description": "body", - "name": "object", - "in": "body", - "required": true, - "schema": { - "type": "string" - } + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } @@ -1328,6 +1359,13 @@ const docTemplate = `{ ], "summary": "Update app endpoint", "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, { "type": "string", "description": "appId", @@ -1336,7 +1374,7 @@ const docTemplate = `{ "required": true }, { - "description": "update app endpoint request", + "description": "Request body to update app endpoint", "name": "body", "in": "body", "required": true, @@ -1349,7 +1387,35 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" + } + } + } + } + }, + "/organizations/{organizationId}/app-serve-apps/{appId}/exist": { + "get": { + "security": [ + { + "JWT": [] + } + ], + "description": "Get appServeApp by giving params", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "AppServeApps" + ], + "summary": "Get appServeApp", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" } } } @@ -1373,6 +1439,22 @@ const docTemplate = `{ "AppServeApps" ], "summary": "Get latest task from appServeApp", + "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -1403,7 +1485,21 @@ const docTemplate = `{ "summary": "Rollback appServeApp", "parameters": [ { - "description": "rollback appserve request", + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + }, + { + "description": "Request body to rollback app", "name": "object", "in": "body", "required": true, @@ -1416,7 +1512,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } @@ -1443,13 +1539,20 @@ const docTemplate = `{ "parameters": [ { "type": "string", - "description": "appId", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", "name": "appId", "in": "path", "required": true }, { - "description": "update app status request", + "description": "Request body to update app status", "name": "body", "in": "body", "required": true, @@ -1462,7 +1565,7 @@ const docTemplate = `{ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 8134fa75..a79499dd 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -1039,13 +1039,14 @@ "parameters": [ { "type": "string", - "description": "organization_Id", - "name": "organization_Id", - "in": "query" + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true }, { - "type": "string", - "description": "show_all", + "type": "boolean", + "description": "Show all apps including deleted apps", "name": "showAll", "in": "query" } @@ -1081,7 +1082,14 @@ "summary": "Install appServeApp", "parameters": [ { - "description": "create appserve request", + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "description": "Request body to create app", "name": "object", "in": "body", "required": true, @@ -1100,34 +1108,6 @@ } } }, - "/organizations/{organizationId}/app-serve-apps/app-id/exist": { - "get": { - "security": [ - { - "JWT": [] - } - ], - "description": "Get appServeApp by giving params", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "AppServeApps" - ], - "summary": "Get appServeApp", - "responses": { - "200": { - "description": "OK", - "schema": { - "type": "boolean" - } - } - } - } - }, "/organizations/{organizationId}/app-serve-apps/count": { "get": { "security": [ @@ -1146,6 +1126,22 @@ "AppServeApps" ], "summary": "Get number of apps on given stack", + "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Stack ID", + "name": "stackId", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -1177,7 +1173,7 @@ "parameters": [ { "type": "string", - "description": "organizationId", + "description": "Organization ID", "name": "organizationId", "in": "path", "required": true @@ -1218,6 +1214,22 @@ "AppServeApps" ], "summary": "Get appServeApp", + "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -1246,7 +1258,21 @@ "summary": "Update appServeApp", "parameters": [ { - "description": "update appserve request", + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + }, + { + "description": "Request body to update app", "name": "object", "in": "body", "required": true, @@ -1259,7 +1285,7 @@ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } @@ -1283,20 +1309,25 @@ "summary": "Uninstall appServeApp", "parameters": [ { - "description": "body", - "name": "object", - "in": "body", - "required": true, - "schema": { - "type": "string" - } + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true } ], "responses": { "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } @@ -1321,6 +1352,13 @@ ], "summary": "Update app endpoint", "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, { "type": "string", "description": "appId", @@ -1329,7 +1367,7 @@ "required": true }, { - "description": "update app endpoint request", + "description": "Request body to update app endpoint", "name": "body", "in": "body", "required": true, @@ -1342,7 +1380,35 @@ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" + } + } + } + } + }, + "/organizations/{organizationId}/app-serve-apps/{appId}/exist": { + "get": { + "security": [ + { + "JWT": [] + } + ], + "description": "Get appServeApp by giving params", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "AppServeApps" + ], + "summary": "Get appServeApp", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "boolean" } } } @@ -1366,6 +1432,22 @@ "AppServeApps" ], "summary": "Get latest task from appServeApp", + "parameters": [ + { + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -1396,7 +1478,21 @@ "summary": "Rollback appServeApp", "parameters": [ { - "description": "rollback appserve request", + "type": "string", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", + "name": "appId", + "in": "path", + "required": true + }, + { + "description": "Request body to rollback app", "name": "object", "in": "body", "required": true, @@ -1409,7 +1505,7 @@ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } @@ -1436,13 +1532,20 @@ "parameters": [ { "type": "string", - "description": "appId", + "description": "Organization ID", + "name": "organizationId", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "App ID", "name": "appId", "in": "path", "required": true }, { - "description": "update app status request", + "description": "Request body to update app status", "name": "body", "in": "body", "required": true, @@ -1455,7 +1558,7 @@ "200": { "description": "OK", "schema": { - "type": "object" + "type": "string" } } } diff --git a/api/swagger/swagger.yaml b/api/swagger/swagger.yaml index 3e8a57de..e93bbd50 100644 --- a/api/swagger/swagger.yaml +++ b/api/swagger/swagger.yaml @@ -2362,14 +2362,15 @@ paths: - application/json description: Get appServeApp list by giving params parameters: - - description: organization_Id - in: query - name: organization_Id + - description: Organization ID + in: path + name: organizationId + required: true type: string - - description: show_all + - description: Show all apps including deleted apps in: query name: showAll - type: string + type: boolean produces: - application/json responses: @@ -2389,7 +2390,12 @@ paths: - application/json description: Install appServeApp parameters: - - description: create appserve request + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: Request body to create app in: body name: object required: true @@ -2413,19 +2419,23 @@ paths: - application/json description: Uninstall appServeApp parameters: - - description: body - in: body - name: object + - description: Organization ID + in: path + name: organizationId required: true - schema: - type: string + type: string + - description: App ID + in: path + name: appId + required: true + type: string produces: - application/json responses: "200": description: OK schema: - type: object + type: string security: - JWT: [] summary: Uninstall appServeApp @@ -2435,6 +2445,17 @@ paths: consumes: - application/json description: Get appServeApp by giving params + parameters: + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: App ID + in: path + name: appId + required: true + type: string produces: - application/json responses: @@ -2452,7 +2473,17 @@ paths: - application/json description: Update appServeApp parameters: - - description: update appserve request + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: App ID + in: path + name: appId + required: true + type: string + - description: Request body to update app in: body name: object required: true @@ -2464,7 +2495,7 @@ paths: "200": description: OK schema: - type: object + type: string security: - JWT: [] summary: Update appServeApp @@ -2476,12 +2507,17 @@ paths: - application/json description: Update app endpoint parameters: + - description: Organization ID + in: path + name: organizationId + required: true + type: string - description: appId in: path name: appId required: true type: string - - description: update app endpoint request + - description: Request body to update app endpoint in: body name: body required: true @@ -2493,17 +2529,45 @@ paths: "200": description: OK schema: - type: object + type: string security: - JWT: [] summary: Update app endpoint tags: - AppServeApps + /organizations/{organizationId}/app-serve-apps/{appId}/exist: + get: + consumes: + - application/json + description: Get appServeApp by giving params + produces: + - application/json + responses: + "200": + description: OK + schema: + type: boolean + security: + - JWT: [] + summary: Get appServeApp + tags: + - AppServeApps /organizations/{organizationId}/app-serve-apps/{appId}/latest-task: get: consumes: - application/json description: Get latest task from appServeApp + parameters: + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: App ID + in: path + name: appId + required: true + type: string produces: - application/json responses: @@ -2522,7 +2586,17 @@ paths: - application/json description: Rollback appServeApp parameters: - - description: rollback appserve request + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: App ID + in: path + name: appId + required: true + type: string + - description: Request body to rollback app in: body name: object required: true @@ -2534,7 +2608,7 @@ paths: "200": description: OK schema: - type: object + type: string security: - JWT: [] summary: Rollback appServeApp @@ -2546,12 +2620,17 @@ paths: - application/json description: Update app status parameters: - - description: appId + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: App ID in: path name: appId required: true type: string - - description: update app status request + - description: Request body to update app status in: body name: body required: true @@ -2563,34 +2642,28 @@ paths: "200": description: OK schema: - type: object + type: string security: - JWT: [] summary: Update app status tags: - AppServeApps - /organizations/{organizationId}/app-serve-apps/app-id/exist: - get: - consumes: - - application/json - description: Get appServeApp by giving params - produces: - - application/json - responses: - "200": - description: OK - schema: - type: boolean - security: - - JWT: [] - summary: Get appServeApp - tags: - - AppServeApps /organizations/{organizationId}/app-serve-apps/count: get: consumes: - application/json description: Get number of apps on given stack + parameters: + - description: Organization ID + in: path + name: organizationId + required: true + type: string + - description: Stack ID + in: query + name: stackId + required: true + type: string produces: - application/json responses: @@ -2609,7 +2682,7 @@ paths: - application/json description: Check duplicate appServeAppName by giving params parameters: - - description: organizationId + - description: Organization ID in: path name: organizationId required: true