From 845205111d00f27da3e0bc11d8e0570ef3dcef9a Mon Sep 17 00:00:00 2001 From: lcawl Date: Fri, 24 May 2024 15:22:16 -0700 Subject: [PATCH 1/2] [HTTP/OAS] Add descriptions for uptime setting APIs --- .../uptime/server/legacy_uptime/uptime_server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts index 0c417a6e061e6..b8a9b56c2a909 100644 --- a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts +++ b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/uptime_server.ts @@ -89,6 +89,7 @@ export const initUptimeServer = ( router.versioned .get({ access: 'public', + description: `Get uptime settings`, path: routeDefinition.path, options: { tags: options?.tags, @@ -115,6 +116,7 @@ export const initUptimeServer = ( router.versioned .put({ access: 'public', + description: `Update uptime settings`, path: routeDefinition.path, options: { tags: options?.tags, From 3858de8fa6a1ff2df2fbdddf45df6fc0fda8671a Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 4 Jun 2024 15:28:33 -0700 Subject: [PATCH 2/2] Add OAS tag --- .../server/legacy_uptime/routes/uptime_route_wrapper.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts index 5beaa563790e8..2590db8524105 100644 --- a/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts +++ b/x-pack/plugins/observability_solution/uptime/server/legacy_uptime/routes/uptime_route_wrapper.ts @@ -12,7 +12,11 @@ import { UptimeEsClient } from '../lib/lib'; export const uptimeRouteWrapper: UMKibanaRouteWrapper = (uptimeRoute, server) => ({ ...uptimeRoute, options: { - tags: ['access:uptime-read', ...(uptimeRoute?.writeAccess ? ['access:uptime-write'] : [])], + tags: [ + 'oas-tag:uptime', + 'access:uptime-read', + ...(uptimeRoute?.writeAccess ? ['access:uptime-write'] : []), + ], }, handler: async (context, request, response) => { const coreContext = await context.core;