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][Meta] Add OAS support for Rules APIs #187356

Open
23 of 58 tasks
cnasikas opened this issue Jul 2, 2024 · 4 comments
Open
23 of 58 tasks

[ResponseOps][Rules][Meta] Add OAS support for Rules APIs #187356

cnasikas opened this issue Jul 2, 2024 · 4 comments
Labels
Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Meta Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@cnasikas
Copy link
Member

cnasikas commented Jul 2, 2024

The Core team added support for OAS in the Kibana routes. To provide users with an up-to-date OAS for the documented public Rules API we need to a) version the remaining HTTP routes b) move the parameters schema of all rule types in a package and c) register the OAS schema on each route. Below, for each category, all steps to achieve our goal are listed.

Related: #157883, #187572, #187574
Example PR that registers OAS schema: #181277

Version HTTP routes

Preview Give feedback

OAS schema registration

Preview Give feedback

Rule params.

Preview Give feedback
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 2, 2024
@cnasikas cnasikas added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework and removed needs-team Issues missing a team label labels Jul 2, 2024
@elasticmachine
Copy link
Contributor

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

@cnasikas cnasikas added the Meta label Jul 2, 2024
@cnasikas cnasikas changed the title [Rules] Add OAS support for Rules APIs [ResponseOps][Rules][Meta] Add OAS support for Rules APIs Jul 2, 2024
@adcoelho
Copy link
Contributor

I added the GET /api/alerting/_health endpoint to the tasks.

@jcger
Copy link
Contributor

jcger commented Aug 27, 2024

I miss the tasks to update params param to use the definition created in the new package

@cnasikas
Copy link
Member Author

cnasikas commented Sep 2, 2024

Good point @jcger! I will update the issue accordingly.

cnasikas added a commit that referenced this issue Oct 23, 2024
## Summary

This PR creates a package containing the schema of the params of all
rule types. It starts as `schema.recordOf(schema.string(),
schema.maybe(schema.any()))` which is the current one. In subsequent
PRs, the schema will be updated to `schema.oneOf([apmRuleType,
esQueryRuleType, ....])`. I also substituted the definition of `params`
in the alerting plugin with the `params` exported from the package.

Towards: #187356
Fixes: #195183

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 23, 2024
## Summary

This PR creates a package containing the schema of the params of all
rule types. It starts as `schema.recordOf(schema.string(),
schema.maybe(schema.any()))` which is the current one. In subsequent
PRs, the schema will be updated to `schema.oneOf([apmRuleType,
esQueryRuleType, ....])`. I also substituted the definition of `params`
in the alerting plugin with the `params` exported from the package.

Towards: elastic#187356
Fixes: elastic#195183

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit a7a81c2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Meta Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

4 participants