Skip to content

Commit

Permalink
feat: Allow multiple services to be stopped or deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
mzottola committed Oct 4, 2023
1 parent 5a78088 commit 09ae517
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,10 @@ paths:
$ref: './resources/EnvironmentServiceDeploy.yaml'
/environment/{environmentId}/service/restart-service:
$ref: './resources/EnvironmentServiceReboot.yaml'
/environment/{environmentId}/service/stop:
$ref: './resources/EnvironmentServiceStop.yaml'
/environment/{environmentId}/service/delete:
$ref: './resources/EnvironmentServiceDelete.yaml'
/organization/{organizationId}/container/deploy:
$ref: './resources/OrganizationContainerAutoDeploy.yaml'
/organization/{organizationId}/container/preview:
Expand Down
26 changes: 26 additions & 0 deletions src/resources/EnvironmentServiceDelete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
post:
summary: 'Delete services'
description: Delete selected services
operationId: deleteSelectedServices
parameters:
- $ref: '../parameters/path/environmentId.yaml'
tags:
- Environment Actions
requestBody:
content:
application/json:
schema:
$ref: '../schemas/EnvironmentServiceIdsAllRequest.yaml'
responses:
'200':
description: 'Services have been triggered to be deleted'
'400':
$ref: '../responses/BadRequest.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'
'409':
description: 'Operation is in progress'
26 changes: 26 additions & 0 deletions src/resources/EnvironmentServiceStop.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
post:
summary: 'Stop services'
description: Stop selected services
operationId: stopSelectedServices
parameters:
- $ref: '../parameters/path/environmentId.yaml'
tags:
- Environment Actions
requestBody:
content:
application/json:
schema:
$ref: '../schemas/EnvironmentServiceIdsAllRequest.yaml'
responses:
'200':
description: 'Services have been triggered to be deleted'
'400':
$ref: '../responses/BadRequest.yaml'
'401':
$ref: '../responses/NotAuthorized.yaml'
'403':
$ref: '../responses/Forbidden.yaml'
'404':
$ref: '../responses/NotFound.yaml'
'409':
description: 'Operation is in progress'
22 changes: 22 additions & 0 deletions src/schemas/EnvironmentServiceIdsAllRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
type: object
properties:
application_ids:
type: array
items:
type: string
format: uuid
container_ids:
type: array
items:
type: string
format: uuid
database_ids:
type: array
items:
type: string
format: uuid
job_ids:
type: array
items:
type: string
format: uuid
2 changes: 2 additions & 0 deletions src/schemas/_index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ EnvironmentVariableRequest:
$ref: ./EnvironmentVariableRequest.yaml
EnvironmentVariableResponseList:
$ref: ./EnvironmentVariableResponseList.yaml
EnvironmentServiceIdsAllRequest:
$ref: ./EnvironmentServiceIdsAllRequest.yaml
APIVariableScopeEnum:
$ref: ./enums/APIVariableScope.yaml
APIVariableTypeEnum:
Expand Down

0 comments on commit 09ae517

Please sign in to comment.