-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.5] [DOCS] Automate docs for create/update/delete case APIs (#142929)…
… (#143806)
- Loading branch information
Showing
18 changed files
with
1,996 additions
and
457 deletions.
There are no files selected for viewing
1,116 changes: 929 additions & 187 deletions
1,116
x-pack/plugins/cases/docs/openapi/bundled-min.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
74 changes: 35 additions & 39 deletions
74
x-pack/plugins/cases/docs/openapi/components/examples/create_case_response.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,36 @@ | ||
summary: The create case API returns a JSON object that includes the user who created the case and the case identifier, version, and creation time. | ||
summary: The create case API returns a JSON object that contains details about the case. | ||
value: | ||
{ | ||
"id": "66b9aa00-94fa-11ea-9f74-e7e108796192", | ||
"version": "WzUzMiwxXQ==", | ||
"comments": [], | ||
"totalComment": 0, | ||
"totalAlerts": 0, | ||
"title": "Case title 1", | ||
"tags": [ "tag-1" ], | ||
"settings": { | ||
"syncAlerts": true | ||
}, | ||
"owner": "cases", | ||
"description": "A case description.", | ||
"duration": null, | ||
"severity": "low", | ||
"closed_at": null, | ||
"closed_by": null, | ||
"created_at": "2022-05-13T09:16:17.416Z", | ||
"created_by": { | ||
"email": null, | ||
"full_name": null, | ||
"username": "elastic" | ||
}, | ||
"status": "open", | ||
"updated_at": null, | ||
"updated_by": null, | ||
"connector": { | ||
"id": "131d4448-abe0-4789-939d-8ef60680b498", | ||
"name": "My connector", | ||
"type": ".jira", | ||
"fields": { | ||
"issueType": "10006", | ||
"parent": null, | ||
"priority": "High" | ||
} | ||
}, | ||
"external_service": null | ||
} | ||
comments: [] | ||
totalAlerts: 0 | ||
id: 66b9aa00-94fa-11ea-9f74-e7e108796192 | ||
version: WzUzMiwxXQ== | ||
totalComment: 1 | ||
title: Case title 1 | ||
tags: | ||
- tag 1 | ||
description: A case description. | ||
settings: | ||
syncAlerts: false | ||
owner: cases | ||
duration: null | ||
severity: low | ||
closed_at: null | ||
closed_by: null | ||
created_at: '2022-03-24T00:37:03.906Z' | ||
created_by: | ||
username: elastic | ||
full_name: null | ||
email: null | ||
status: open | ||
updated_at: null | ||
updated_by: null | ||
connector: | ||
id: 131d4448-abe0-4789-939d-8ef60680b498 | ||
name: My connector | ||
type: .jira | ||
fields: | ||
issueType: '10006' | ||
parent: null | ||
priority: High | ||
external_service: null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
title: Create or upate case request properties for Cases Webhook connector | ||
required: | ||
- fields | ||
- id | ||
- name | ||
- type | ||
description: Defines properties for connectors when type is `.cases-webhook`. | ||
type: object | ||
properties: | ||
fields: | ||
type: string | ||
nullable: true | ||
example: null | ||
id: | ||
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. | ||
type: string | ||
name: | ||
description: The name of the connector. | ||
type: string | ||
type: | ||
description: The type of connector. | ||
type: string | ||
example: .cases-webhook | ||
enum: | ||
- .cases-webhook |
41 changes: 41 additions & 0 deletions
41
x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
title: Create or update case request properties for a Jira connector | ||
required: | ||
- fields | ||
- id | ||
- name | ||
- type | ||
description: Defines properties for connectors when type is `.jira`. | ||
type: object | ||
properties: | ||
fields: | ||
description: An object containing the connector fields. If you want to omit any individual field, specify null as its value. | ||
type: object | ||
required: | ||
- issueType | ||
- parent | ||
- priority | ||
properties: | ||
issueType: | ||
description: The type of issue. | ||
type: string | ||
nullable: true | ||
parent: | ||
description: The key of the parent issue, when the issue type is sub-task. | ||
type: string | ||
nullable: true | ||
priority: | ||
description: The priority of the issue. | ||
type: string | ||
nullable: true | ||
id: | ||
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. | ||
type: string | ||
name: | ||
description: The name of the connector. | ||
type: string | ||
type: | ||
description: The type of connector. | ||
type: string | ||
example: .jira | ||
enum: | ||
- .jira |
28 changes: 28 additions & 0 deletions
28
x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
title: Create or update case request properties for no connector | ||
required: | ||
- fields | ||
- id | ||
- name | ||
- type | ||
description: Defines properties for connectors when type is `.none`. | ||
type: object | ||
properties: | ||
fields: | ||
description: An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null. | ||
nullable: true | ||
type: string | ||
example: null | ||
id: | ||
description: The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. | ||
type: string | ||
example: none | ||
name: | ||
description: The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. | ||
type: string | ||
example: none | ||
type: | ||
description: The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`. | ||
type: string | ||
example: .none | ||
enum: | ||
- .none |
37 changes: 37 additions & 0 deletions
37
x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
title: Create case request properties for a IBM Resilient connector | ||
required: | ||
- fields | ||
- id | ||
- name | ||
- type | ||
description: Defines properties for connectors when type is `.resilient`. | ||
type: object | ||
properties: | ||
fields: | ||
description: An object containing the connector fields. If you want to omit any individual field, specify null as its value. | ||
type: object | ||
nullable: true | ||
required: | ||
- issueTypes | ||
- severityCode | ||
properties: | ||
issueTypes: | ||
description: The type of incident. | ||
type: array | ||
items: | ||
type: string | ||
severityCode: | ||
description: The severity code of the incident. | ||
type: string | ||
id: | ||
description: The identifier for the connector. | ||
type: string | ||
name: | ||
description: The name of the connector. | ||
type: string | ||
type: | ||
description: The type of connector. | ||
type: string | ||
example: .resilient | ||
enum: | ||
- .resilient |
51 changes: 51 additions & 0 deletions
51
x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
title: Create case request properties for a ServiceNow ITSM connector | ||
required: | ||
- fields | ||
- id | ||
- name | ||
- type | ||
description: Defines properties for connectors when type is `.servicenow`. | ||
type: object | ||
properties: | ||
fields: | ||
description: An object containing the connector fields. If you want to omit any individual field, specify null as its value. | ||
type: object | ||
required: | ||
- category | ||
- impact | ||
- severity | ||
- subcategory | ||
- urgency | ||
properties: | ||
category: | ||
description: The category of the incident. | ||
type: string | ||
nullable: true | ||
impact: | ||
description: The effect an incident had on business. | ||
type: string | ||
nullable: true | ||
severity: | ||
description: The severity of the incident. | ||
type: string | ||
nullable: true | ||
subcategory: | ||
description: The subcategory of the incident. | ||
type: string | ||
nullable: true | ||
urgency: | ||
description: The extent to which the incident resolution can be delayed. | ||
type: string | ||
nullable: true | ||
id: | ||
description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. | ||
type: string | ||
name: | ||
description: The name of the connector. | ||
type: string | ||
type: | ||
description: The type of connector. | ||
type: string | ||
example: .servicenow | ||
enum: | ||
- .servicenow |
Oops, something went wrong.