Skip to content

Commit

Permalink
[OAS] Add legacy connector API response descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Aug 28, 2024
1 parent c736c81 commit 311504f
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
9 changes: 8 additions & 1 deletion x-pack/plugins/actions/server/routes/legacy/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ export const createActionRoute = (
deprecated: true,
},
validate: {
body: bodySchema,
request: {
body: bodySchema,
},
response: {
200: {
description: 'Indicates a successful call.',
},
},
},
},
router.handleLegacyErrors(
Expand Down
9 changes: 8 additions & 1 deletion x-pack/plugins/actions/server/routes/legacy/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,14 @@ export const deleteActionRoute = (
deprecated: true,
},
validate: {
params: paramSchema,
request: {
params: paramSchema,
},
response: {
204: {
description: 'Indicates a successful call.',
},
},
},
},
router.handleLegacyErrors(async function (context, req, res) {
Expand Down
11 changes: 9 additions & 2 deletions x-pack/plugins/actions/server/routes/legacy/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ export const executeActionRoute = (
tags: ['oas-tag:connectors'],
},
validate: {
body: bodySchema,
params: paramSchema,
request: {
body: bodySchema,
params: paramSchema,
},
response: {
200: {
description: 'Indicates a successful call.',
},
},
},
},
router.handleLegacyErrors(async function (context, req, res) {
Expand Down
9 changes: 8 additions & 1 deletion x-pack/plugins/actions/server/routes/legacy/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ export const getActionRoute = (
tags: ['oas-tag:connectors'],
},
validate: {
params: paramSchema,
request: {
params: paramSchema,
},
response: {
200: {
description: 'Indicates a successful call.',
},
},
},
},
router.handleLegacyErrors(async function (context, req, res) {
Expand Down
11 changes: 9 additions & 2 deletions x-pack/plugins/actions/server/routes/legacy/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,15 @@ export const updateActionRoute = (
tags: ['oas-tag:connectors'],
},
validate: {
body: bodySchema,
params: paramSchema,
request: {
body: bodySchema,
params: paramSchema,
},
response: {
200: {
description: 'Indicates a successful call.',
},
},
},
},
router.handleLegacyErrors(async function (context, req, res) {
Expand Down

0 comments on commit 311504f

Please sign in to comment.