diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f5d66069..6c2981618 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Added missing `status` to `/_search/template` response ([#702](https://github.com/opensearch-project/opensearch-api-specification/pull/702)) - Added `_type` to `rank_eval` API specs ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704)) - Added request body to `_search_shards` API specs ([#709](https://github.com/opensearch-project/opensearch-api-specification/pull/709)) +- Added NodeAttributes as additional property in `shard_stores` API specs ([#715](https://github.com/opensearch-project/opensearch-api-specification/pull/715)) - Added missing `repository` query parameter to `/_cat/snapshots` ([#700](https://github.com/opensearch-project/opensearch-api-specification/pull/700)) ### Removed diff --git a/spec/namespaces/_core.yaml b/spec/namespaces/_core.yaml index 3b71f9287..d48733fd5 100644 --- a/spec/namespaces/_core.yaml +++ b/spec/namespaces/_core.yaml @@ -2710,7 +2710,7 @@ components: additionalProperties: type: object indices_boost: - description: Allows increasing the relevance of specific indices in the search. + description: Allows increasing the relevance of specific indexes in the search. type: object additionalProperties: type: number diff --git a/spec/schemas/indices.shard_stores.yaml b/spec/schemas/indices.shard_stores.yaml index 0745101db..9b76b9027 100644 --- a/spec/schemas/indices.shard_stores.yaml +++ b/spec/schemas/indices.shard_stores.yaml @@ -40,6 +40,8 @@ components: $ref: '_common.yaml#/components/schemas/Id' store_exception: $ref: '#/components/schemas/ShardStoreException' + additionalProperties: + $ref: '_common.yaml#/components/schemas/NodeAttributes' required: - allocation ShardStoreAllocation: diff --git a/tests/default/_core/shard_stores.yaml b/tests/default/_core/shard_stores.yaml new file mode 100644 index 000000000..d425f9b73 --- /dev/null +++ b/tests/default/_core/shard_stores.yaml @@ -0,0 +1,26 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test _shard_stores API. +prologues: + - path: /_bulk + method: POST + parameters: + refresh: true + request: + content_type: application/x-ndjson + payload: + - {create: {_index: movies, _id: movie1}} + - {director: Quentin Tarantino, title: Pulp Fiction, year: 1994} + - {create: {_index: movies, _id: movie2}} + - {director: Christopher Nolan, title: Inception, year: 2010} +epilogues: + - path: /movies + method: DELETE + status: [200, 404] + +chapters: + - synopsis: Verify shard store information across all indices. + path: /_shard_stores + method: GET + response: + status: 200 diff --git a/tests/default/indices/shard_stores.yaml b/tests/default/indices/shard_stores.yaml new file mode 100644 index 000000000..07ca4f8fc --- /dev/null +++ b/tests/default/indices/shard_stores.yaml @@ -0,0 +1,28 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test _shard_stores API. +prologues: + - path: /_bulk + method: POST + parameters: + refresh: true + request: + content_type: application/x-ndjson + payload: + - {create: {_index: movies, _id: movie1}} + - {director: Quentin Tarantino, title: Pulp Fiction, year: 1994} + - {create: {_index: movies, _id: movie2}} + - {director: Christopher Nolan, title: Inception, year: 2010} +epilogues: + - path: /movies + method: DELETE + status: [200, 404] + +chapters: + - synopsis: Verify shard store information for a specific index. + path: /{index}/_shard_stores + parameters: + index: movies + method: GET + response: + status: 200 diff --git a/tests/default/notifications/configs.yaml b/tests/default/notifications/configs.yaml index 3a1523f1e..b89256418 100644 --- a/tests/default/notifications/configs.yaml +++ b/tests/default/notifications/configs.yaml @@ -91,7 +91,33 @@ chapters: config_id: webhook-configuration response: status: 200 + - synopsis: Create another channel configuration. + path: /_plugins/_notifications/configs + method: POST + request: + payload: + config_id: second-configuration + config: + name: Notifications Channel + description: Second notifications channel. + config_type: webhook + is_enabled: true + webhook: + url: http://webhook:8080/ + response: + status: 200 + - synopsis: Delete multiple channel configurations. + version: '>= 2.2' + path: /_plugins/_notifications/configs + method: DELETE + parameters: + config_id_list: second-configuration + response: + status: 200 epilogues: - path: /_plugins/_notifications/configs/webhook-configuration method: DELETE status: [200,404] + - path: /_plugins/_notifications/configs/second-configuration + method: DELETE + status: [200,404] diff --git a/tests/plugins/notifications/notifications/feature/test.yaml b/tests/plugins/notifications/notifications/feature/test.yaml index e889155e1..084aa8b78 100644 --- a/tests/plugins/notifications/notifications/feature/test.yaml +++ b/tests/plugins/notifications/notifications/feature/test.yaml @@ -17,7 +17,7 @@ prologues: url: http://webhook:8080/ status: [200] chapters: - - synopsis: Test sending a notification. + - synopsis: Test sending a notification (GET). path: /_plugins/_notifications/feature/test/{config_id} method: GET parameters: @@ -31,6 +31,20 @@ chapters: delivery_status: status_code: '200' status_text: '{"ok":"true"}' + - synopsis: Test sending a notification (POST). + path: /_plugins/_notifications/feature/test/{config_id} + method: POST + parameters: + config_id: custom-webhook-configuration + response: + status: 200 + payload: + status_list: + - config_id: custom-webhook-configuration + config_type: webhook + delivery_status: + status_code: '200' + status_text: '{"ok":"true"}' epilogues: - path: /_plugins/_notifications/configs/custom-webhook-configuration method: DELETE