From 0d247777295aa0c4a467a3ef19d98363bf4e0183 Mon Sep 17 00:00:00 2001 From: cshivaraj-patil Date: Tue, 14 Jul 2026 08:25:52 +0530 Subject: [PATCH] SOD-7837 Updated the Ocean Right-Sizing Savings OpenAPI documentation to align with the current API implementation. Added the required clusterIdentifier field to the request schema. Renamed workloadName to name and isDeleted to workloadDeleted. Updated the request/response schemas and examples to match the current API implementation. --- .../responses/oceanRightsizingSavingsResponse.yaml | 8 ++++---- .../rightsizing/schemas/oceanRightsizingSavings.yaml | 4 ++-- .../schemas/oceanRightsizingSavingsRequest.yaml | 6 ++++++ .../oceanRightsizingSavingsWorkloadsRequest.yaml | 10 +++++----- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/api/services/ocean/rightsizing/responses/oceanRightsizingSavingsResponse.yaml b/api/services/ocean/rightsizing/responses/oceanRightsizingSavingsResponse.yaml index b365159ca..a4cc9d68b 100644 --- a/api/services/ocean/rightsizing/responses/oceanRightsizingSavingsResponse.yaml +++ b/api/services/ocean/rightsizing/responses/oceanRightsizingSavingsResponse.yaml @@ -32,7 +32,7 @@ content: - namespace: "default" savings: 500 workloadSavings: - - workloadName: "coredns" + - name: "coredns" workloadType: "Deployment" namespace: "kube-system" cpuWithOcean: 25 @@ -40,8 +40,8 @@ content: memoryWithOcean: 32 memoryWithoutOcean: 64 savings: 250 - isDeleted: True - - workloadName: "aws-node" + workloadDeleted: true + - name: "aws-node" workloadType: "DaemonSet" namespace: "kube-system" cpuWithOcean: 25 @@ -49,7 +49,7 @@ content: memoryWithOcean: 32 memoryWithoutOcean: 64 savings: 250 - isDeleted": False + workloadDeleted: false count: example: 1 kind: diff --git a/api/services/ocean/rightsizing/schemas/oceanRightsizingSavings.yaml b/api/services/ocean/rightsizing/schemas/oceanRightsizingSavings.yaml index 82273dbb3..28227ad08 100644 --- a/api/services/ocean/rightsizing/schemas/oceanRightsizingSavings.yaml +++ b/api/services/ocean/rightsizing/schemas/oceanRightsizingSavings.yaml @@ -31,7 +31,7 @@ properties: items: type: object properties: - workloadName: + name: type: string workloadType: type: string @@ -47,7 +47,7 @@ properties: type: number savings: type: number - isDeleted: + workloadDeleted: type: boolean diff --git a/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsRequest.yaml b/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsRequest.yaml index 058392804..37aeec369 100644 --- a/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsRequest.yaml +++ b/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsRequest.yaml @@ -3,10 +3,16 @@ title: Ocean Right-Sizing Savings description: > Determines the Ocean right-sizing savings required: + - clusterIdentifier - endTime - startTime - workloads properties: + clusterIdentifier: + type: string + example: "my-cluster" + description: > + Identifier of the Ocean cluster. startTime: type: string example: 2025-01-20T11:35:02.745Z diff --git a/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsWorkloadsRequest.yaml b/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsWorkloadsRequest.yaml index 3f97142e7..5e24815fb 100644 --- a/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsWorkloadsRequest.yaml +++ b/api/services/ocean/rightsizing/schemas/oceanRightsizingSavingsWorkloadsRequest.yaml @@ -10,7 +10,7 @@ properties: items: type: object properties: - workloadName: + name: type: string description: The name of the workload workloadType: @@ -19,12 +19,12 @@ properties: example: namespaceName1: - - workloadName: workloadName1 + - name: workloadName1 workloadType: Deployment - - workloadName: workloadName2 + - name: workloadName2 workloadType: DaemonSet namespaceName2: - - workloadName: workloadName3 + - name: workloadName3 workloadType: StatefulSet - - workloadName: workloadName4 + - name: workloadName4 workloadType: Deployment