From f57b64f9f8acac26f4654f91760854e5af65745d Mon Sep 17 00:00:00 2001 From: Kevin Delemme Date: Tue, 8 Aug 2023 12:20:44 -0400 Subject: [PATCH] Add response required fields --- .../docs/openapi/slo/bundled.json | 28 +++++++++++++++++++ .../docs/openapi/slo/bundled.yaml | 25 +++++++++++++++++ .../slo/components/schemas/error_budget.yaml | 5 ++++ .../slo/components/schemas/slo_response.yaml | 16 +++++++++++ .../slo/components/schemas/summary.yaml | 4 +++ 5 files changed, 78 insertions(+) diff --git a/x-pack/plugins/observability/docs/openapi/slo/bundled.json b/x-pack/plugins/observability/docs/openapi/slo/bundled.json index efc5fd9c5b15f..a949bc868850e 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/bundled.json +++ b/x-pack/plugins/observability/docs/openapi/slo/bundled.json @@ -1264,6 +1264,12 @@ "error_budget": { "title": "Error budget", "type": "object", + "required": [ + "initial", + "consumed", + "remaining", + "isEstimated" + ], "properties": { "initial": { "type": "number", @@ -1291,6 +1297,11 @@ "title": "Summary", "type": "object", "description": "The SLO computed data", + "required": [ + "status", + "sliValue", + "errorBudget" + ], "properties": { "status": { "$ref": "#/components/schemas/summary_status" @@ -1307,6 +1318,23 @@ "slo_response": { "title": "SLO response", "type": "object", + "required": [ + "id", + "name", + "description", + "indicator", + "timeWindow", + "budgetingMethod", + "objective", + "settings", + "revision", + "summary", + "enabled", + "groupBy", + "instanceId", + "createdAt", + "updatedAt" + ], "properties": { "id": { "description": "The identifier of the SLO.", diff --git a/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml b/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml index ec2aa41bc77af..1a134dd4d5d6b 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/bundled.yaml @@ -867,6 +867,11 @@ components: error_budget: title: Error budget type: object + required: + - initial + - consumed + - remaining + - isEstimated properties: initial: type: number @@ -888,6 +893,10 @@ components: title: Summary type: object description: The SLO computed data + required: + - status + - sliValue + - errorBudget properties: status: $ref: '#/components/schemas/summary_status' @@ -899,6 +908,22 @@ components: slo_response: title: SLO response type: object + required: + - id + - name + - description + - indicator + - timeWindow + - budgetingMethod + - objective + - settings + - revision + - summary + - enabled + - groupBy + - instanceId + - createdAt + - updatedAt properties: id: description: The identifier of the SLO. diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/error_budget.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/error_budget.yaml index c344c8472821d..3fc9505989fe9 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/error_budget.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/error_budget.yaml @@ -1,5 +1,10 @@ title: Error budget type: object +required: + - initial + - consumed + - remaining + - isEstimated properties: initial: type: number diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml index 0663c31e40a0f..b4e5eb85f3264 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/slo_response.yaml @@ -1,5 +1,21 @@ title: SLO response type: object +required: + - id + - name + - description + - indicator + - timeWindow + - budgetingMethod + - objective + - settings + - revision + - summary + - enabled + - groupBy + - instanceId + - createdAt + - updatedAt properties: id: description: The identifier of the SLO. diff --git a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/summary.yaml b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/summary.yaml index a7b1be7d053b1..5dfb724f31834 100644 --- a/x-pack/plugins/observability/docs/openapi/slo/components/schemas/summary.yaml +++ b/x-pack/plugins/observability/docs/openapi/slo/components/schemas/summary.yaml @@ -1,6 +1,10 @@ title: Summary type: object description: The SLO computed data +required: + - status + - sliValue + - errorBudget properties: status: $ref: './summary_status.yaml'