From aa52513dde3be9a95bff9f42ed1376b3ffcaba3b Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:25:40 -0800 Subject: [PATCH 1/3] Add gateway service configuration task --- platform/api.yml | 7 +++ .../environments/services/discovery/tasks.yml | 2 +- .../environments/services/gateway/tasks.yml | 52 +++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 platform/paths/environments/services/gateway/tasks.yml diff --git a/platform/api.yml b/platform/api.yml index 3f55308e..833c664a 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -99,6 +99,7 @@ x-tagGroups: - Deployments - Scoped Variables - Services/Discovery + - Services/Gateway - Services/Load Balancer - Services/Scheduler - Services/VPN @@ -198,6 +199,8 @@ tags: - name: Scoped Variables description: Endpoints related to managing an environment's scoped variables. - name: Services/Discovery + description: Endpoints related to managing an environment's gateway service. + - name: Services/Gateway description: Endpoints related to managing an environment's discovery service. - name: Services/Load Balancer description: Endpoints related to managing an environment's load balancer service. @@ -456,6 +459,10 @@ paths: "/v1/environments/{environmentId}/services/discovery/tasks": $ref: "./paths/environments/services/discovery/tasks.yml" + ## Services/Discovery + "/v1/environments/{environmentId}/services/gateway/tasks": + $ref: "./paths/environments/services/gateway/tasks.yml" + ## Services/Load Balancer "/v1/environments/{environmentId}/services/lb": $ref: "./paths/environments/services/loadbalancer/loadbalancer.yml" diff --git a/platform/paths/environments/services/discovery/tasks.yml b/platform/paths/environments/services/discovery/tasks.yml index 33a448b0..14d82f3c 100644 --- a/platform/paths/environments/services/discovery/tasks.yml +++ b/platform/paths/environments/services/discovery/tasks.yml @@ -46,7 +46,7 @@ post: responses: 202: - description: Returns a Job Descriptor. + description: Returns a job descriptor. content: application/json: schema: diff --git a/platform/paths/environments/services/gateway/tasks.yml b/platform/paths/environments/services/gateway/tasks.yml new file mode 100644 index 00000000..2632dfd0 --- /dev/null +++ b/platform/paths/environments/services/gateway/tasks.yml @@ -0,0 +1,52 @@ +post: + operationId: "createGatewayServiceJob" + summary: Create Gateway Service Job + description: Creates a task that will update the gateway service's configuration. + tags: + - Services/Gateway + parameters: + - name: environmentId + description: The ID of the environment where this gateway service resides. + in: path + required: true + schema: + type: string + requestBody: + description: Parameters for reconfiguring a gateway service. + content: + application/json: + schema: + type: object + required: + - action + - contents + properties: + action: + type: string + enum: + - reconfigure + description: The name of the action to perform. + contents: + type: object + properties: + auto_update: + type: + - boolean + - "null" + description: A boolean where `true` represents the desire to automatically update the environment gateway service. + + responses: + 202: + description: Returns a job descriptor. + content: + application/json: + schema: + title: "TaskResponse" + type: object + required: + - data + properties: + data: + $ref: ../../../../../components/schemas/jobs/JobDescriptor.yml + default: + $ref: ../../../../../components/responses/errors/DefaultError.yml From 4677d91b2176c8aeaa6d9e5d6884f2a4c483d6b7 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:26:18 -0800 Subject: [PATCH 2/3] fix header comment --- platform/api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/api.yml b/platform/api.yml index 833c664a..6a5778e0 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -459,7 +459,7 @@ paths: "/v1/environments/{environmentId}/services/discovery/tasks": $ref: "./paths/environments/services/discovery/tasks.yml" - ## Services/Discovery + ## Services/Gatewa "/v1/environments/{environmentId}/services/gateway/tasks": $ref: "./paths/environments/services/gateway/tasks.yml" From 5b3aa7dca7469f5a1e92e246ace699f005dfbbae Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Thu, 9 Jan 2025 16:26:27 -0800 Subject: [PATCH 3/3] fix header comment --- platform/api.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/api.yml b/platform/api.yml index 6a5778e0..540b5374 100644 --- a/platform/api.yml +++ b/platform/api.yml @@ -459,7 +459,7 @@ paths: "/v1/environments/{environmentId}/services/discovery/tasks": $ref: "./paths/environments/services/discovery/tasks.yml" - ## Services/Gatewa + ## Services/Gateway "/v1/environments/{environmentId}/services/gateway/tasks": $ref: "./paths/environments/services/gateway/tasks.yml"