-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add is_hidden parameter for create or update alias API #429
Conversation
Signed-off-by: gaobinlong <[email protected]>
Changes AnalysisCommit SHA: f60bfdc API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/9985179729/artifacts/1713469909 API Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! See below.
So the tests for <= 2.15 pass because we weren't checking parameters? Do update them to have the correct version
if there are fields used in tests against a version that doesn't support them, so we don't imply they can work.
CHANGELOG.md
Outdated
@@ -46,6 +46,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) | |||
- Added missing fields to `/_nodes/stats` ([#415](https://github.com/opensearch-project/opensearch-api-specification/pull/415)) | |||
- Added missing metrics options to `/_nodes/stats` ([#422](https://github.com/opensearch-project/opensearch-api-specification/pull/422)) | |||
- Added tests against OpenSearch 1.3 ([#424](https://github.com/opensearch-project/opensearch-api-specification/pull/424)) | |||
- Add `is_hidden` parameter for create or update alias API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it look like the rest of the lines.
"Added is_hidden
to /{index}/_alias/
(#...)"
x-version-added: '2.16' | ||
description: |- | ||
If `true`, the alias will be hidden, defaults to `false`. | ||
type: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add default: false
, and no need to say "defaults to ..." in the text. We're going to clean these up at some point.
@@ -0,0 +1,42 @@ | |||
$schema: ../../json_schemas/test_story.schema.yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have alias.yaml
that has a lot of similar tests. Either add one more test for is_hidden
there, or create a folder called tests/indices/alias/is_hidden.yaml
and include only functionality related to this new is_hidden into it. I think the former seems simpler.
You also need to add version: '>= 2.16'
into the test so it doesn't run with older OpenSearch (I expect it to fail).
Signed-off-by: gaobinlong <[email protected]>
Thanks @dblock , please help to take a look at the new change. |
Description
In this PR, we fix the bug of create or update alias API doesn't throw exception for unsupported parameters, and also add the missing request body parameter
is_hidden
, so we need to update the api specification.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.