Skip to content

Commit

Permalink
[HTTP/OAS] Add descriptions for upgrade assistant APIs (#184269)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored May 28, 2024
1 parent a9c8e8f commit e595d28
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export function registerBatchReindexIndicesRoutes(
router.get(
{
path: `${BASE_PATH}/batch/queue`,
options: {
access: 'public',
description: `Get the batch reindex queue`,
},
validate: {},
},
versionCheckHandlerWrapper(async ({ core }, request, response) => {
Expand Down Expand Up @@ -71,6 +75,10 @@ export function registerBatchReindexIndicesRoutes(
router.post(
{
path: `${BASE_PATH}/batch`,
options: {
access: 'public',
description: `Batch start or resume reindex`,
},
validate: {
body: schema.object({
indexNames: schema.arrayOf(schema.string()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export function registerReindexIndicesRoutes(
router.post(
{
path: `${BASE_PATH}/{indexName}`,
options: {
access: 'public',
description: `Start or resume reindex`,
},
validate: {
params: schema.object({
indexName: schema.string(),
Expand Down Expand Up @@ -77,6 +81,10 @@ export function registerReindexIndicesRoutes(
router.get(
{
path: `${BASE_PATH}/{indexName}`,
options: {
access: 'public',
description: `Get reindex status`,
},
validate: {
params: schema.object({
indexName: schema.string(),
Expand Down Expand Up @@ -134,6 +142,10 @@ export function registerReindexIndicesRoutes(
router.post(
{
path: `${BASE_PATH}/{indexName}/cancel`,
options: {
access: 'public',
description: `Cancel reindex`,
},
validate: {
params: schema.object({
indexName: schema.string(),
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/upgrade_assistant/server/routes/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ export function registerUpgradeStatusRoute({
router.get(
{
path: `${API_BASE_PATH}/status`,
options: {
access: 'public',
description: `Get upgrade readiness status`,
},
validate: false,
},
versionCheckHandlerWrapper(async ({ core }, request, response) => {
Expand Down

0 comments on commit e595d28

Please sign in to comment.