From ebe0f8a885f7db7e882d160c101055a5aa70a707 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Sat, 14 Dec 2024 01:54:54 +1300 Subject: [PATCH] Disambiguate snapshot schema naming (#730) Signed-off-by: Thomas Farr --- CHANGELOG.md | 1 + spec/namespaces/snapshot.yaml | 2 +- spec/schemas/snapshot._common.yaml | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6fdd6040..4b87969f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683)) - Changed `SearchModelsQuery`, `CreateConnectorRequest` & `RegisterAgentsRequest` to be defined inline of request bodies ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725)) - Changed `indices.data_streams_stats:DataStreamsStatsItem` to instead be `indices._common:DataStreamStats` ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725)) +- Changed naming of `snapshot._common`'s `Status`, `ShardsStats`, `ShardsStatsStage`, `ShardsStatsSummary` and `ShardsStatsSummaryItem` schemas to be prefixed with `Snapshot` ([#730](https://github.com/opensearch-project/opensearch-api-specification/pull/730)) ## [0.1.0] - 2024-10-25 diff --git a/spec/namespaces/snapshot.yaml b/spec/namespaces/snapshot.yaml index 1c4dc532c..f039049f2 100644 --- a/spec/namespaces/snapshot.yaml +++ b/spec/namespaces/snapshot.yaml @@ -478,7 +478,7 @@ components: snapshots: type: array items: - $ref: '../schemas/snapshot._common.yaml#/components/schemas/Status' + $ref: '../schemas/snapshot._common.yaml#/components/schemas/SnapshotStatus' required: - snapshots snapshot.verify_repository@200: diff --git a/spec/schemas/snapshot._common.yaml b/spec/schemas/snapshot._common.yaml index f894210dd..d21823669 100644 --- a/spec/schemas/snapshot._common.yaml +++ b/spec/schemas/snapshot._common.yaml @@ -104,7 +104,7 @@ components: $ref: '_common.yaml#/components/schemas/StringifiedBoolean' required: - location - Status: + SnapshotStatus: type: object properties: include_global_state: @@ -116,7 +116,7 @@ components: repository: type: string shards_stats: - $ref: '#/components/schemas/ShardsStats' + $ref: '#/components/schemas/SnapshotShardsStats' snapshot: type: string state: @@ -141,7 +141,7 @@ components: additionalProperties: $ref: '#/components/schemas/SnapshotShardsStatus' shards_stats: - $ref: '#/components/schemas/ShardsStats' + $ref: '#/components/schemas/SnapshotShardsStats' stats: $ref: '#/components/schemas/SnapshotStats' required: @@ -156,13 +156,13 @@ components: reason: type: string stage: - $ref: '#/components/schemas/ShardsStatsStage' + $ref: '#/components/schemas/SnapshotShardsStatsStage' stats: - $ref: '#/components/schemas/ShardsStatsSummary' + $ref: '#/components/schemas/SnapshotShardsStatsSummary' required: - stage - stats - ShardsStatsStage: + SnapshotShardsStatsStage: oneOf: - type: string const: DONE @@ -179,15 +179,15 @@ components: - type: string const: STARTED description: Number of shards in the snapshot that are in the started stage of being stored in the repository. - ShardsStatsSummary: + SnapshotShardsStatsSummary: type: object properties: incremental: - $ref: '#/components/schemas/ShardsStatsSummaryItem' + $ref: '#/components/schemas/SnapshotShardsStatsSummaryItem' processed: - $ref: '#/components/schemas/ShardsStatsSummaryItem' + $ref: '#/components/schemas/SnapshotShardsStatsSummaryItem' total: - $ref: '#/components/schemas/ShardsStatsSummaryItem' + $ref: '#/components/schemas/SnapshotShardsStatsSummaryItem' start_time_in_millis: $ref: '_common.yaml#/components/schemas/EpochTimeUnitMillis' time: @@ -199,7 +199,7 @@ components: - start_time_in_millis - time_in_millis - total - ShardsStatsSummaryItem: + SnapshotShardsStatsSummaryItem: type: object properties: file_count: @@ -210,7 +210,7 @@ components: required: - file_count - size_in_bytes - ShardsStats: + SnapshotShardsStats: type: object properties: done: