mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[ResponseOps][Connectors] Add descriptions for OpenAPI responses (#191678)
This commit is contained in:
parent
23854878ec
commit
1016ef06d7
10 changed files with 89 additions and 27 deletions
|
@ -27,11 +27,16 @@ export const getConnectorRoute = (
|
|||
access: 'public',
|
||||
summary: `Get connector information`,
|
||||
tags: ['oas-tag:connectors'],
|
||||
// description:
|
||||
// 'You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.',
|
||||
},
|
||||
validate: {
|
||||
params: getConnectorParamsSchemaV1,
|
||||
request: {
|
||||
params: getConnectorParamsSchemaV1,
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
|
@ -63,16 +63,21 @@ export const createActionRoute = (
|
|||
access: 'public',
|
||||
summary: 'Create a connector',
|
||||
tags: ['oas-tag:connectors'],
|
||||
// description:
|
||||
// 'You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.',
|
||||
},
|
||||
validate: {
|
||||
params: schema.maybe(
|
||||
schema.object({
|
||||
id: schema.maybe(schema.string()),
|
||||
})
|
||||
),
|
||||
body: bodySchema,
|
||||
request: {
|
||||
params: schema.maybe(
|
||||
schema.object({
|
||||
id: schema.maybe(schema.string()),
|
||||
})
|
||||
),
|
||||
body: bodySchema,
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
|
@ -29,11 +29,17 @@ export const deleteActionRoute = (
|
|||
access: 'public',
|
||||
summary: `Delete a connector`,
|
||||
description: 'WARNING: When you delete a connector, it cannot be recovered.',
|
||||
// You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.
|
||||
tags: ['oas-tag:connectors'],
|
||||
},
|
||||
validate: {
|
||||
params: paramSchema,
|
||||
request: {
|
||||
params: paramSchema,
|
||||
},
|
||||
response: {
|
||||
204: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
|
@ -46,12 +46,18 @@ export const executeActionRoute = (
|
|||
summary: `Run a connector`,
|
||||
description:
|
||||
'You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.',
|
||||
// You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. If you use an index connector, you must also have `all`, `create`, `index`, or `write` indices privileges.
|
||||
tags: ['oas-tag:connectors'],
|
||||
},
|
||||
validate: {
|
||||
body: bodySchema,
|
||||
params: paramSchema,
|
||||
request: {
|
||||
body: bodySchema,
|
||||
params: paramSchema,
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
|
@ -40,7 +40,14 @@ export const createActionRoute = (
|
|||
deprecated: true,
|
||||
},
|
||||
validate: {
|
||||
body: bodySchema,
|
||||
request: {
|
||||
body: bodySchema,
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -58,12 +58,17 @@ export const updateActionRoute = (
|
|||
access: 'public',
|
||||
summary: `Update a connector`,
|
||||
tags: ['oas-tag:connectors'],
|
||||
// description:
|
||||
// 'You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.',
|
||||
},
|
||||
validate: {
|
||||
body: bodySchema,
|
||||
params: paramSchema,
|
||||
request: {
|
||||
body: bodySchema,
|
||||
params: paramSchema,
|
||||
},
|
||||
response: {
|
||||
200: {
|
||||
description: 'Indicates a successful call.',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
router.handleLegacyErrors(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue