Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disambiguate snapshot schema naming #730

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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
Loading