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

[ResponseOps][Rules] OAS schema registration for newly versioned Rule APIs #189153

Merged
merged 7 commits into from
Jul 26, 2024

Conversation

adcoelho
Copy link
Contributor

Summary

Issue: #187574

This PR updates request and response schemas below for rule APIs to generate OAS documentation:

  • POST /api/alerting/rule/{id?}/_enable
  • POST /api/alerting/rule/{id?}/_disable
  • POST /api/alerting/rule/{id?}/_update_api_key

How to test

  1. Start ES
  2. Add server.oas.enabled: true to kibana.dev.yml
  3. Start Kibana yarn start --no-base-path
  4. curl -s -u elastic:changeme http://localhost:5601/api/oas\?pathStartsWith\=/api/alerting/rule/ | jq
  5. Look for _enable, _disable and _update_api_key in the resulting JSON

@adcoelho adcoelho added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework v8.16.0 labels Jul 25, 2024
@adcoelho adcoelho self-assigned this Jul 25, 2024
@adcoelho adcoelho requested a review from a team as a code owner July 25, 2024 07:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @adcoelho

Copy link
Contributor

@js-jankisalvi js-jankisalvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@umbopepato umbopepato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The requests show up correctly in the OAS spec, LGTM!

image

@adcoelho adcoelho merged commit 64b45e0 into elastic:main Jul 26, 2024
38 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants