|
|
@@ -820,10 +820,11 @@ func getV1StackRoutes(
|
|
|
Router: r,
|
|
|
})
|
|
|
|
|
|
- // PATCH /api/v1/projects/{project_id}/clusters/{cluster_id}/namespaces/{namespace}/stacks/{stack_id}/update_name -> stack.NewStackAddApplicationHandler
|
|
|
- // swagger:operation PATCH /api/v1/projects/{project_id}/clusters/{cluster_id}/namespaces/{namespace}/stacks/{stack_id}/update_name addApplication
|
|
|
+ // PATCH /api/v1/projects/{project_id}/clusters/{cluster_id}/namespaces/{namespace}/stacks/{stack_id} -> stack.NewStackUpdateStackHandler
|
|
|
+ // swagger:operation PATCH /api/v1/projects/{project_id}/clusters/{cluster_id}/namespaces/{namespace}/stacks/{stack_id} updateStack
|
|
|
//
|
|
|
- // Adds an application to an existing stack
|
|
|
+ // Updates a stack.
|
|
|
+ // Currently only the stack name can be updated.
|
|
|
//
|
|
|
// ---
|
|
|
// produces:
|
|
|
@@ -837,15 +838,13 @@ func getV1StackRoutes(
|
|
|
// - name: namespace
|
|
|
// - name: stack_id
|
|
|
// - in: body
|
|
|
- // name: AddApplicationToStack
|
|
|
- // description: The application to add
|
|
|
+ // name: UpdateStack
|
|
|
+ // description: The stack to update
|
|
|
// schema:
|
|
|
- // $ref: '#/definitions/CreateStackAppResourceRequest'
|
|
|
+ // $ref: '#/definitions/UpdateStackRequest'
|
|
|
// responses:
|
|
|
// '200':
|
|
|
- // description: Successfully added the application to the stack
|
|
|
- // '400':
|
|
|
- // description: Stack does not have any revisions
|
|
|
+ // description: Successfully updated the stack
|
|
|
// '403':
|
|
|
// description: Forbidden
|
|
|
updateStackNameEndpoint := factory.NewAPIEndpoint(
|
|
|
@@ -854,7 +853,7 @@ func getV1StackRoutes(
|
|
|
Method: types.HTTPVerbPatch,
|
|
|
Path: &types.Path{
|
|
|
Parent: basePath,
|
|
|
- RelativePath: relPath + "/{stack_id}/update_name",
|
|
|
+ RelativePath: relPath + "/{stack_id}",
|
|
|
},
|
|
|
Scopes: []types.PermissionScope{
|
|
|
types.UserScope,
|
|
|
@@ -866,7 +865,7 @@ func getV1StackRoutes(
|
|
|
},
|
|
|
)
|
|
|
|
|
|
- updateStackNameHandler := stack.NewStackUpdateStackNameHandler(
|
|
|
+ updateStackNameHandler := stack.NewStackUpdateStackHandler(
|
|
|
config,
|
|
|
factory.GetDecoderValidator(),
|
|
|
factory.GetResultWriter(),
|