Skip to content

Commit

Permalink
Disambiguate snapshot schema naming (opensearch-project#730)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
Signed-off-by: Nathalie Jonathan <[email protected]>
  • Loading branch information
Xtansia authored and nathaliellenaa committed Dec 18, 2024
1 parent a9712ff commit d2710c7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,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

Expand Down
2 changes: 1 addition & 1 deletion spec/namespaces/snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 12 additions & 12 deletions spec/schemas/snapshot._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ components:
$ref: '_common.yaml#/components/schemas/StringifiedBoolean'
required:
- location
Status:
SnapshotStatus:
type: object
properties:
include_global_state:
Expand All @@ -116,7 +116,7 @@ components:
repository:
type: string
shards_stats:
$ref: '#/components/schemas/ShardsStats'
$ref: '#/components/schemas/SnapshotShardsStats'
snapshot:
type: string
state:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -199,7 +199,7 @@ components:
- start_time_in_millis
- time_in_millis
- total
ShardsStatsSummaryItem:
SnapshotShardsStatsSummaryItem:
type: object
properties:
file_count:
Expand All @@ -210,7 +210,7 @@ components:
required:
- file_count
- size_in_bytes
ShardsStats:
SnapshotShardsStats:
type: object
properties:
done:
Expand Down

0 comments on commit d2710c7

Please sign in to comment.