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] Create the rule params package #196971

Merged
merged 12 commits into from
Oct 23, 2024
Merged
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ packages/kbn-resizable-layout @elastic/kibana-data-discovery
examples/resizable_layout_examples @elastic/kibana-data-discovery
x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution
packages/response-ops/feature_flag_service @elastic/response-ops
packages/response-ops/rule_params @elastic/response-ops
examples/response_stream @elastic/ml-ui
packages/kbn-rison @elastic/kibana-operations
x-pack/packages/rollup @elastic/kibana-management
Expand Down
8 changes: 4 additions & 4 deletions oas_docs/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -2413,7 +2414,6 @@
"consumer",
"schedule",
"actions",
"params",
Copy link
Member Author

Choose a reason for hiding this comment

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

Why it get removed from the required? What is it because it has a defaultValue?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd would think it's because of the default value, yes. You could try removing it and checking the bundle by yourself. Just follow the instructions in x-pack/plugins/alerting/docs/openapi/README.md

Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you add the defaultValue? Shouldn't it throw if it's missing in the request?

"created_by",
"updated_by",
"created_at",
Expand Down Expand Up @@ -3427,6 +3427,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -3651,7 +3652,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down Expand Up @@ -4648,6 +4648,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -4872,7 +4873,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down Expand Up @@ -6153,6 +6153,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -6377,7 +6378,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down
8 changes: 4 additions & 4 deletions oas_docs/bundle.serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -2413,7 +2414,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down Expand Up @@ -3427,6 +3427,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -3651,7 +3652,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down Expand Up @@ -4648,6 +4648,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -4872,7 +4873,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down Expand Up @@ -6153,6 +6153,7 @@
},
"params": {
"additionalProperties": {},
"default": {},
"description": "The parameters for the rule.",
"type": "object"
},
Expand Down Expand Up @@ -6377,7 +6378,6 @@
"consumer",
"schedule",
"actions",
"params",
"created_by",
"updated_by",
"created_at",
Expand Down
8 changes: 4 additions & 4 deletions oas_docs/output/kibana.serverless.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -1764,7 +1765,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -2737,6 +2737,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -2937,7 +2938,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -3881,6 +3881,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -4081,7 +4082,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -5119,6 +5119,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -5319,7 +5320,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down
8 changes: 4 additions & 4 deletions oas_docs/output/kibana.serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -1764,7 +1765,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -2737,6 +2737,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -2937,7 +2938,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -3881,6 +3881,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -4081,7 +4082,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -5119,6 +5119,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -5319,7 +5320,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down
8 changes: 4 additions & 4 deletions oas_docs/output/kibana.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -2145,7 +2146,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -3118,6 +3118,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -3318,7 +3319,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -4262,6 +4262,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -4462,7 +4463,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -5500,6 +5500,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -5700,7 +5701,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down
8 changes: 4 additions & 4 deletions oas_docs/output/kibana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -2145,7 +2146,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -3118,6 +3118,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -3318,7 +3319,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -4262,6 +4262,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -4462,7 +4463,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down Expand Up @@ -5500,6 +5500,7 @@ paths:
type: string
params:
additionalProperties: {}
default: {}
description: The parameters for the rule.
type: object
revision:
Expand Down Expand Up @@ -5700,7 +5701,6 @@ paths:
- consumer
- schedule
- actions
- params
- created_by
- updated_by
- created_at
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@
"@kbn/resizable-layout-examples-plugin": "link:examples/resizable_layout_examples",
"@kbn/resolver-test-plugin": "link:x-pack/test/plugin_functional/plugins/resolver_test",
"@kbn/response-ops-feature-flag-service": "link:packages/response-ops/feature_flag_service",
"@kbn/response-ops-rule-params": "link:packages/response-ops/rule_params",
"@kbn/response-stream-plugin": "link:examples/response_stream",
"@kbn/rison": "link:packages/kbn-rison",
"@kbn/rollup": "link:x-pack/packages/rollup",
Expand Down
Loading