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 of the rest of rule's public APIs #195182

Closed
4 tasks done
cnasikas opened this issue Oct 7, 2024 · 1 comment · Fixed by #196690
Closed
4 tasks done

[ResponseOps][Rules] OAS schema registration of the rest of rule's public APIs #195182

cnasikas opened this issue Oct 7, 2024 · 1 comment · Fixed by #196690
Assignees
Labels
Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@cnasikas
Copy link
Member

cnasikas commented Oct 7, 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

Blocked by: #195181

API Routes

@cnasikas cnasikas added Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Oct 7, 2024
@elasticmachine
Copy link
Contributor

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

@cnasikas cnasikas changed the title ResponseOps][Rules] OAS schema registration of the rest of rule's public APIs [ResponseOps][Rules] OAS schema registration of the rest of rule's public APIs Oct 7, 2024
jcger added a commit that referenced this issue Oct 15, 2024
## Summary

Linked to #195182

### muteAll 

- added 40x error codes to response
- `public` access prop already set
[here](https://github.com/elastic/kibana/blob/8545b9ccfbad97881406e56ffd96f452c94032b8/x-pack/plugins/alerting/server/routes/rule/apis/mute_all/mute_all_rule.ts#L28)
- request schema already with description
[here](https://github.com/elastic/kibana/blob/8545b9ccfbad97881406e56ffd96f452c94032b8/x-pack/plugins/alerting/common/routes/rule/apis/mute_all/schemas/v1.ts#L11)
- no response schema

### unmuteAll

- added 40x error codes to response
- `public` access prop already set
[here](https://github.com/elastic/kibana/blob/563910b672b6dbe4f9e7931e36ec41e674fe8eb3/x-pack/plugins/alerting/server/routes/rule/apis/unmute_all/unmute_all_rule.ts#L25)
- params schema already with description
[here](https://github.com/elastic/kibana/blob/563910b672b6dbe4f9e7931e36ec41e674fe8eb3/x-pack/plugins/alerting/common/routes/rule/apis/unmute_all/schemas/v1.ts#L11)
- no response schema

### rule types

- added 40x error code to response
- `public` access prop already set
[here](https://github.com/elastic/kibana/blob/563910b672b6dbe4f9e7931e36ec41e674fe8eb3/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts#L23)
- no request schema
- added response schema descriptions

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jcger added a commit to jcger/kibana that referenced this issue Oct 15, 2024
## Summary

Linked to elastic#195182

### muteAll

- added 40x error codes to response
- `public` access prop already set
[here](https://github.com/elastic/kibana/blob/8545b9ccfbad97881406e56ffd96f452c94032b8/x-pack/plugins/alerting/server/routes/rule/apis/mute_all/mute_all_rule.ts#L28)
- request schema already with description
[here](https://github.com/elastic/kibana/blob/8545b9ccfbad97881406e56ffd96f452c94032b8/x-pack/plugins/alerting/common/routes/rule/apis/mute_all/schemas/v1.ts#L11)
- no response schema

### unmuteAll

- added 40x error codes to response
- `public` access prop already set
[here](https://github.com/elastic/kibana/blob/563910b672b6dbe4f9e7931e36ec41e674fe8eb3/x-pack/plugins/alerting/server/routes/rule/apis/unmute_all/unmute_all_rule.ts#L25)
- params schema already with description
[here](https://github.com/elastic/kibana/blob/563910b672b6dbe4f9e7931e36ec41e674fe8eb3/x-pack/plugins/alerting/common/routes/rule/apis/unmute_all/schemas/v1.ts#L11)
- no response schema

### rule types

- added 40x error code to response
- `public` access prop already set
[here](https://github.com/elastic/kibana/blob/563910b672b6dbe4f9e7931e36ec41e674fe8eb3/x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts#L23)
- no request schema
- added response schema descriptions

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 611082a)

# Conflicts:
#	x-pack/plugins/alerting/common/routes/rule/apis/list_types/schemas/v1.ts
#	x-pack/plugins/alerting/server/routes/rule/apis/list_types/rule_types.ts
@jcger jcger closed this as completed in c1ac722 Oct 18, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Oct 18, 2024
## Summary

Closes elastic#195181
Closes elastic#195182

OAS descriptions and HTTP version for `GET /api/alerting/_health`

(cherry picked from commit c1ac722)
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 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.

3 participants