mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[OAS] Add mute_all and unmute_all response codes (#190265)
Co-authored-by: Antonio <antoniodcoelho@gmail.com> Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
This commit is contained in:
parent
17ee494f04
commit
945784b465
3 changed files with 27 additions and 5 deletions
|
@ -192,7 +192,7 @@ export const createParamsSchema = schema.object({
|
|||
id: schema.maybe(
|
||||
schema.string({
|
||||
meta: {
|
||||
description: 'The identifier for the rule.',
|
||||
description: 'The identifier for the rule. If it is omitted, an ID is randomly generated.',
|
||||
},
|
||||
})
|
||||
),
|
||||
|
|
|
@ -14,7 +14,11 @@ import { AlertingRequestHandlerContext, BASE_ALERTING_API_PATH } from '../types'
|
|||
import { trackDeprecatedRouteUsage } from '../lib/track_deprecated_route_usage';
|
||||
|
||||
const paramSchema = schema.object({
|
||||
id: schema.string(),
|
||||
id: schema.string({
|
||||
meta: {
|
||||
description: 'The identifier for the rule.',
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
export const muteAllRuleRoute = (
|
||||
|
@ -31,7 +35,14 @@ export const muteAllRuleRoute = (
|
|||
tags: ['oas-tag:alerting'],
|
||||
},
|
||||
validate: {
|
||||
params: paramSchema,
|
||||
request: {
|
||||
params: paramSchema,
|
||||
},
|
||||
response: {
|
||||
204: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
|
@ -12,7 +12,11 @@ import { verifyAccessAndContext } from './lib';
|
|||
import { AlertingRequestHandlerContext, BASE_ALERTING_API_PATH } from '../types';
|
||||
|
||||
const paramSchema = schema.object({
|
||||
id: schema.string(),
|
||||
id: schema.string({
|
||||
meta: {
|
||||
description: 'The identifier for the rule.',
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
export const unmuteAllRuleRoute = (
|
||||
|
@ -28,7 +32,14 @@ export const unmuteAllRuleRoute = (
|
|||
tags: ['oas-tag:alerting'],
|
||||
},
|
||||
validate: {
|
||||
params: paramSchema,
|
||||
request: {
|
||||
params: paramSchema,
|
||||
},
|
||||
response: {
|
||||
204: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue