From a41ff6357f87f7c8b940a530a2bad9b861146c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Vannicatte?= Date: Thu, 9 Nov 2023 10:00:57 +0100 Subject: [PATCH] feat(specs): add `window` parameter to observability responses --- specs/ingestion/common/schemas/common.yml | 15 +++++++++++++++ specs/ingestion/common/schemas/run.yml | 2 ++ specs/ingestion/paths/runs/events/events.yml | 3 +++ 3 files changed, 20 insertions(+) diff --git a/specs/ingestion/common/schemas/common.yml b/specs/ingestion/common/schemas/common.yml index 8bed2a66ca..3302747ae0 100644 --- a/specs/ingestion/common/schemas/common.yml +++ b/specs/ingestion/common/schemas/common.yml @@ -60,3 +60,18 @@ eventID: name: type: string description: An human readable name describing the object. + +Window: + type: object + additionalProperties: false + description: The window parameter represents the holds the dates used to query the Observability data from the database in a given window. + properties: + startDate: + type: string + description: A date in format RFC3339 representing the oldest possible data in query window. + endDate: + type: string + description: A date in format RFC3339 representing the newest possible data in query window. + required: + - startDate + - endDate diff --git a/specs/ingestion/common/schemas/run.yml b/specs/ingestion/common/schemas/run.yml index 8e111b0992..669d103106 100644 --- a/specs/ingestion/common/schemas/run.yml +++ b/specs/ingestion/common/schemas/run.yml @@ -21,6 +21,8 @@ RunListResponse: $ref: '#/Run' pagination: $ref: './pagination.yml#/Pagination' + window: + $ref: './common.yml#/Window' required: - runs - pagination diff --git a/specs/ingestion/paths/runs/events/events.yml b/specs/ingestion/paths/runs/events/events.yml index ff53a98831..6c7622e985 100644 --- a/specs/ingestion/paths/runs/events/events.yml +++ b/specs/ingestion/paths/runs/events/events.yml @@ -28,8 +28,11 @@ get: $ref: '../../../common/schemas/event.yml#/Event' pagination: $ref: '../../../common/schemas/pagination.yml#/Pagination' + window: + $ref: '../../../common/schemas/common.yml#/Window' required: - events - pagination + - window '400': $ref: '../../../../common/responses/BadRequest.yml'