Skip to content

Commit ebe0f8a

Browse files
authored
Disambiguate snapshot schema naming (#730)
Signed-off-by: Thomas Farr <[email protected]>
1 parent dd7fd9a commit ebe0f8a

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
7474
- 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))
7575
- Changed `SearchModelsQuery`, `CreateConnectorRequest` & `RegisterAgentsRequest` to be defined inline of request bodies ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725))
7676
- Changed `indices.data_streams_stats:DataStreamsStatsItem` to instead be `indices._common:DataStreamStats` ([#725](https://github.com/opensearch-project/opensearch-api-specification/pull/725))
77+
- 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))
7778

7879
## [0.1.0] - 2024-10-25
7980

spec/namespaces/snapshot.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ components:
478478
snapshots:
479479
type: array
480480
items:
481-
$ref: '../schemas/snapshot._common.yaml#/components/schemas/Status'
481+
$ref: '../schemas/snapshot._common.yaml#/components/schemas/SnapshotStatus'
482482
required:
483483
- snapshots
484484
snapshot.verify_repository@200:

spec/schemas/snapshot._common.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ components:
104104
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
105105
required:
106106
- location
107-
Status:
107+
SnapshotStatus:
108108
type: object
109109
properties:
110110
include_global_state:
@@ -116,7 +116,7 @@ components:
116116
repository:
117117
type: string
118118
shards_stats:
119-
$ref: '#/components/schemas/ShardsStats'
119+
$ref: '#/components/schemas/SnapshotShardsStats'
120120
snapshot:
121121
type: string
122122
state:
@@ -141,7 +141,7 @@ components:
141141
additionalProperties:
142142
$ref: '#/components/schemas/SnapshotShardsStatus'
143143
shards_stats:
144-
$ref: '#/components/schemas/ShardsStats'
144+
$ref: '#/components/schemas/SnapshotShardsStats'
145145
stats:
146146
$ref: '#/components/schemas/SnapshotStats'
147147
required:
@@ -156,13 +156,13 @@ components:
156156
reason:
157157
type: string
158158
stage:
159-
$ref: '#/components/schemas/ShardsStatsStage'
159+
$ref: '#/components/schemas/SnapshotShardsStatsStage'
160160
stats:
161-
$ref: '#/components/schemas/ShardsStatsSummary'
161+
$ref: '#/components/schemas/SnapshotShardsStatsSummary'
162162
required:
163163
- stage
164164
- stats
165-
ShardsStatsStage:
165+
SnapshotShardsStatsStage:
166166
oneOf:
167167
- type: string
168168
const: DONE
@@ -179,15 +179,15 @@ components:
179179
- type: string
180180
const: STARTED
181181
description: Number of shards in the snapshot that are in the started stage of being stored in the repository.
182-
ShardsStatsSummary:
182+
SnapshotShardsStatsSummary:
183183
type: object
184184
properties:
185185
incremental:
186-
$ref: '#/components/schemas/ShardsStatsSummaryItem'
186+
$ref: '#/components/schemas/SnapshotShardsStatsSummaryItem'
187187
processed:
188-
$ref: '#/components/schemas/ShardsStatsSummaryItem'
188+
$ref: '#/components/schemas/SnapshotShardsStatsSummaryItem'
189189
total:
190-
$ref: '#/components/schemas/ShardsStatsSummaryItem'
190+
$ref: '#/components/schemas/SnapshotShardsStatsSummaryItem'
191191
start_time_in_millis:
192192
$ref: '_common.yaml#/components/schemas/EpochTimeUnitMillis'
193193
time:
@@ -199,7 +199,7 @@ components:
199199
- start_time_in_millis
200200
- time_in_millis
201201
- total
202-
ShardsStatsSummaryItem:
202+
SnapshotShardsStatsSummaryItem:
203203
type: object
204204
properties:
205205
file_count:
@@ -210,7 +210,7 @@ components:
210210
required:
211211
- file_count
212212
- size_in_bytes
213-
ShardsStats:
213+
SnapshotShardsStats:
214214
type: object
215215
properties:
216216
done:

0 commit comments

Comments
 (0)