-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ResponseOps][Rules] Version enable rule route #188645
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
Changes look good. 👍
Are you going to handle adding description to schema for OAS in a separate PR?
@js-jankisalvi i will I only learned how to do the oas changes after reviewing your PR and when I did that I had already finished versioning this :D |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
cc @adcoelho |
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.
test('throws an error if API params do not match the schema', async () => { | ||
await expect( | ||
// @ts-ignore: this is what we are testing | ||
async () => await rulesClient.enable({ id: 1 }) |
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.
nit: async/await could likely be omitted here
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.
LGTM just 1 comment
try { | ||
await rulesClient.enable({ id }); | ||
await rulesClient.enable(params); |
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.
let's follow the pattern and rename this rulesClient.enableRule
so enable.ts
-> enable_rule.ts
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.
Detection Rules Management changes LGTM
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @adcoelho |
Summary
Parent Issue: #187572
Versions the
POST /rule/{id}/_enable
endpoint.Checklist