Skip to content

Commit

Permalink
[8.11] [OAS] Migrate connector APIs to v3.1.0 (elastic#171464) (elast…
Browse files Browse the repository at this point in the history
…ic#171945)

# Backport

This will backport the following commits from `main` to `8.11`:
- [[OAS] Migrate connector APIs to v3.1.0
(elastic#171464)](elastic#171464)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-24T20:51:14Z","message":"[OAS]
Migrate connector APIs to v3.1.0
(elastic#171464)","sha":"14886bf8b8a1629535e9b3ce0d6a6485b98299e5","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Actions/ConnectorsManagement","backport:prev-minor","v8.12.0"],"number":171464,"url":"https://github.com/elastic/kibana/pull/171464","mergeCommit":{"message":"[OAS]
Migrate connector APIs to v3.1.0
(elastic#171464)","sha":"14886bf8b8a1629535e9b3ce0d6a6485b98299e5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171464","number":171464,"mergeCommit":{"message":"[OAS]
Migrate connector APIs to v3.1.0
(elastic#171464)","sha":"14886bf8b8a1629535e9b3ce0d6a6485b98299e5"}}]}]
BACKPORT-->
  • Loading branch information
lcawl authored Nov 28, 2023
1 parent ae1f93c commit 70e913e
Show file tree
Hide file tree
Showing 75 changed files with 949 additions and 549 deletions.
619 changes: 410 additions & 209 deletions x-pack/plugins/actions/docs/openapi/bundled.json

Large diffs are not rendered by default.

462 changes: 279 additions & 183 deletions x-pack/plugins/actions/docs/openapi/bundled.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ description: An identifier for the action.
required: true
schema:
type: string
example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad
examples:
- c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ description: An identifier for the connector.
required: true
schema:
type: string
example: df770e30-8b8b-11ed-a780-3b746c987a81
examples:
- df770e30-8b8b-11ed-a780-3b746c987a81
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ description: An identifier for the space. If `/s/` and the identifier are omitte
required: true
schema:
type: string
example: default
examples:
- default
18 changes: 18 additions & 0 deletions x-pack/plugins/actions/docs/openapi/components/responses/400.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: Indicates a bad request.
content:
application/json:
schema:
type: object
properties:
error:
type: string
examples:
- Bad Request
message:
type: string
examples:
- "error validating action type config: [index]: expected value of type [string] but got [undefined]"
statusCode:
type: integer
examples:
- 400
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ content:
properties:
error:
type: string
example: Unauthorized
examples:
- Unauthorized
enum:
- Unauthorized
message:
type: string
statusCode:
type: integer
example: 401
examples:
- 401
enum:
- 401
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ content:
properties:
error:
type: string
example: Not Found
examples:
- Not Found
enum:
- Not Found
message:
type: string
example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found"
examples:
- "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found"
statusCode:
type: integer
example: 404
examples:
- 404
enum:
- 404
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ properties:
connector. The JSON is validated once the Mustache variables have been
placed when the REST method runs. Manually ensure that the JSON is valid,
disregarding the Mustache variables, so the later validation will pass.
example: {"body": {{{case.comment}}}}
examples:
- {"body": {{{case.comment}}}}
createCommentMethod:
type: string
description: >
Expand All @@ -40,7 +41,8 @@ properties:
You can use a variable to add the external system ID to the URL. If you
are using the `xpack.actions.allowedHosts setting`, add the hostname to
the allowed hosts.
example: https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment
examples:
- https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment
createIncidentJson:
type: string
description: >
Expand All @@ -52,7 +54,8 @@ properties:
connector. The JSON is validated after the Mustache variables have been
placed when REST method runs. Manually ensure that the JSON is valid to
avoid future validation errors; disregard Mustache variables during your review.
example: {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
examples:
- {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
createIncidentMethod:
type: string
description: >
Expand Down Expand Up @@ -86,7 +89,8 @@ properties:
variables have been placed when REST method runs. Manually ensure that the
JSON is valid, disregarding the Mustache variables, so the later
validation will pass.
example: https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}
examples:
- https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}
hasAuth:
type: boolean
description: If true, a username and password for login type authentication must be provided.
Expand All @@ -107,7 +111,8 @@ properties:
connector. The JSON is validated after the Mustache variables have been
placed when REST method runs. Manually ensure that the JSON is valid to
avoid future validation errors; disregard Mustache variables during your review.
example: {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
examples:
- {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
updateIncidentMethod:
type: string
description: >
Expand All @@ -124,12 +129,14 @@ properties:
The REST API URL to update the case by ID in the third-party system. You
can use a variable to add the external system ID to the URL. If you are
using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.
example: https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}
examples:
- https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}
viewIncidentUrl:
type: string
description: >
The URL to view the case in the external system. You can use variables to
add the external system ID or external system title to the URL.
example: https://testing-jira.atlassian.net/browse/{{{external.system.title}}}
examples:
- https://testing-jira.atlassian.net/browse/{{{external.system.title}}}


Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ properties:
description: >
The client identifier, which is a part of OAuth 2.0 client credentials authentication, in GUID format.
If `service` is `exchange_server`, this property is required.
type: string
nullable: true
type:
- "string"
- "null"
from:
description: >
The from address for all emails sent by the connector. It must be specified in `user@host-name` format.
Expand All @@ -27,8 +28,9 @@ properties:
type: string
oauthTokenUrl:
# description: TBD
type: string
nullable: true
type:
- "string"
- "null"
port:
description: >
The port to connect to on the service provider.
Expand All @@ -55,5 +57,6 @@ properties:
description: >
The tenant identifier, which is part of OAuth 2.0 client credentials authentication, in GUID format.
If `service` is `exchange_server`, this property is required.
type: string
nullable: true
type:
- "string"
- "null"
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ properties:
executionTimeField:
description: A field that indicates when the document was indexed.
default: null
type: string
nullable: true
type:
- "string"
- "null"
index:
description: The Elasticsearch index to be written to.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ type: object
properties:
apiUrl:
description: The PagerDuty event URL.
type: string
nullable: true
example: https://events.pagerduty.com/v2/enqueue
type:
- "string"
- "null"
examples:
- https://events.pagerduty.com/v2/enqueue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ properties:
description: >
If `true`, a user name and password must be provided for login type authentication.
headers:
type: object
nullable: true
type:
- "object"
- "null"
description: A set of key-value pairs sent as headers with the request.
method:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ properties:
description: >
The request URL for the Elastic Alerts trigger in xMatters.
It is applicable only when `usesBasic` is `true`.
type: string
nullable: true
type:
- "string"
- "null"
usesBasic:
description: Specifies whether the connector uses HTTP basic authentication (`true`) or URL authentication (`false`).
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
title: Connector response properties for an email connector
type: object
required:
- config
- connector_type_id
- id
- is_deprecated
Expand Down Expand Up @@ -29,3 +28,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ properties:
$ref: 'is_system_action.yaml'
name:
type: string
description: The display name for the connector.
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ required:
- name
properties:
config:
type: object
nullable: true
type:
- "object"
- "null"
connector_type_id:
type: string
description: The type of connector.
Expand All @@ -30,3 +31,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ properties:
name:
type: string
description: The display name for the connector.
referenced_by_count:
$ref: 'referenced_by_count.yaml'
Loading

0 comments on commit 70e913e

Please sign in to comment.