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 Rule APIs #187574

Closed
10 tasks done
cnasikas opened this issue Jul 4, 2024 · 1 comment · Fixed by #188830
Closed
10 tasks done

[ResponseOps][Rules] OAS schema registration for Rule APIs #187574

cnasikas opened this issue Jul 4, 2024 · 1 comment · Fixed by #188830
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@cnasikas
Copy link
Member

cnasikas commented Jul 4, 2024

Towards #187356 we should register the OAS schema for the following APIs. Requirements:

  • All routes should have the access: 'public' property
  • Routes do not have to use the addVersion property
  • All attributes of all schemas should add the description meta property

Documentation: https://docs.elastic.dev/kibana-dev-docs/genereating-oas-for-http-apis
Example PR that registers OAS schema: #181277

@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 4, 2024
@dmlemeshko dmlemeshko added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jul 8, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 8, 2024
js-jankisalvi added a commit that referenced this issue Jul 24, 2024
## Summary

Issue:  #187574

This PR updates `request` and `response` schemas below for rule APIs to
generate OAS documentation:
- `POST /api/alerting/rule/{id?}`
- `GET /api/alerting/rule/{id}`
- `DELETE /api/alerting/rule/{id}`
- `PUT /api/alerting/rule/{id}`
- `GET /api/alerting/rules/_find`
- `POST /api/alerting/rule/{rule_id}/alert/{alert_id}/_mute`


### 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 -uelastic:changeme
http://localhost:5601/api/oas\?pathStartsWith\=/api/alerting/rule/ | jq`
5. For find api run `curl -s -uelastic:changeme
http://localhost:5601/api/oas\?pathStartsWith\=/api/alerting/rules/ |
jq`
adcoelho added a commit that referenced this issue Jul 26, 2024
… APIs (#189153)

## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants