Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow multiple services to be stopped or deleted #461

Merged
1 commit merged into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
$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 Expand Up @@ -758,11 +762,11 @@
#/organization/{organizationId}/job/deploy:
components:
parameters:
$ref: './parameters/_index.yaml'

Check warning on line 765 in src/openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-unused-component

Potentially unused component has been detected.
schemas:
$ref: './schemas/_index.yaml'

Check warning on line 767 in src/openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-unused-component

Potentially unused component has been detected.
responses:
$ref: './responses/_index.yaml'

Check warning on line 769 in src/openapi.yaml

View workflow job for this annotation

GitHub Actions / Lint (pull_request)

oas3-unused-component

Potentially unused component has been detected.
securitySchemes:
bearerAuth:
type: http
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
Loading