Skip to content

Commit

Permalink
[OAS][Cases] Add case templates to case configuration APIs (elastic#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Jul 8, 2024
1 parent 94cab93 commit 35ee0cc
Show file tree
Hide file tree
Showing 35 changed files with 1,367 additions and 630 deletions.
959 changes: 654 additions & 305 deletions x-pack/plugins/cases/docs/openapi/bundled.json

Large diffs are not rendered by default.

688 changes: 455 additions & 233 deletions x-pack/plugins/cases/docs/openapi/bundled.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ value:
closure_type: close-by-user
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
defaultValue: Custom text field value.
label: my-text-field
required: false
type: text
owner: cases
created_at: 2023-06-01T17:07:17.767Z
created_at: 2024-07-01T17:07:17.767Z
created_by:
username: elastic
email: null
Expand All @@ -21,5 +22,30 @@ value:
type: .none
fields: null
mappings: []
version: WzUxLDRd
version: WzEyLDNd
error: null
templates:
- key: 505932fe-ee3a-4960-a661-c781b5acdb05
name: template-1
caseFields:
title: Default case title
tags:
- Default case tag
category: Default-category
description: A default description for cases.
assignees:
- uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
connector:
id: none
type: .none
fields: null
name: none
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
value: Default text field value.
type: text
settings:
syncAlerts: false
description: A description of the template.
tags:
- Template tag 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
summary: Set the closure type and default connector for Stack Management cases.
summary: Set the closure type, custom fields, and default connector for Stack Management cases.
value:
owner: cases
connector:
Expand All @@ -11,4 +11,23 @@ value:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
label: my-text-field
required: false
type: text
type: text
defaultValue: My custom field default value.
templates:
- key: 505932fe-ee3a-4960-a661-c781b5acdb05
name: template-1
caseFields:
title: Default case title
tags:
- Default case tag
category: Default-category
description: A default description for cases.
assignees:
- uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
type: text
value: A text field value for the template.
description: A description of the template.
tags:
- Template tag 1
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,27 @@ value:
label: my-text-field
required: false
type: text
defaultValue: My custom field default value.
templates:
- key: 505932fe-ee3a-4960-a661-c781b5acdb05
name: template-1
caseFields:
title: Default case title
tags:
- Default case tag
category: Default-category
description: A default description for cases.
assignees:
- uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
type: text
value: A text field value for the template.
description: A description of the template.
tags:
- Template tag 1
owner: cases
created_at: 2023-10-01T17:07:17.767Z
created_at: 2024-07-01T17:07:17.767Z
created_by:
username: elastic
email: null,
Expand All @@ -30,6 +49,9 @@ value:
- source: comments
target: comments
action_type: append
- source: tags
target: labels
action_type: overwrite
version: WzIwNzMsMV0=
error: null
id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ value:
label: my-text-field
required: true
type: text
defaultValue: "A new default value."
- key: fcc6840d-eb14-42df-8aaf-232201a705ec
label: my-toggle
required: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ value:
label: my-text-field
required: true
type: text
defaultValue: A new default value.
- key: fcc6840d-eb14-42df-8aaf-232201a705ec
label: my-toggle
required: false
type: toggle
owner: cases
created_at: 2023-10-01T17:07:17.767Z
created_at: 2024-07-01T17:07:17.767Z
created_by:
username: elastic
email: null,
email: null
full_name: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
updated_at: 2023-10-19T00:52:42.401Z
updated_at: 2024-07-19T00:52:42.401Z
updated_by:
username: elastic
full_name: null
Expand All @@ -35,9 +36,13 @@ value:
- source: description
target: description
action_type: overwrite
- source: tags
target: labels
action_type: overwrite
- source: comments
target: comments
action_type: append
version: zEzNSw1XQ==
version: WzI2LDNd
error: null
id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6
id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6
templates: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: A word or phrase that categorizes the case.
type: string
maxLength: 50
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
defaultValue:
oneOf:
- type: string
- type: boolean
description: >
A default value for the custom field.
If the `type` is `text`, the default value must be a string.
If the `type` is `toggle`, the default value must be boolean.
key:
description: >
A unique key for the custom field.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
closure_type:
$ref: 'closure_types.yaml'
customFields:
type: array
x-technical-preview: true
description: Custom fields configuration details.
items:
type: object
properties:
$ref: 'case_configure_customfields.yaml'
connector:
type: object
properties:
Expand All @@ -25,6 +17,14 @@ created_by:
- username
properties:
$ref: 'user_properties.yaml'
customFields:
type: array
x-technical-preview: true
description: Custom fields configuration details.
items:
type: object
properties:
$ref: 'case_configure_customfields.yaml'
error:
type:
- "string"
Expand Down Expand Up @@ -54,6 +54,8 @@ mappings:
- summary
owner:
$ref: 'owners.yaml'
templates:
$ref: 'templates.yaml'
updated_at:
type:
- "string"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: The description for the case.
type: string
maxLength: 30000
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ properties:
settings:
$ref: 'settings.yaml'
severity:
$ref: 'severity_property.yaml'
$ref: 'case_severity.yaml'
status:
$ref: 'status.yaml'
$ref: 'case_status.yaml'
tags:
type: array
items:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: >
The words and phrases that help categorize cases. It can be an empty array.
type: array
maxItems: 200
items:
type: string
maxLength: 256
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
description: A title for the case.
type: string
maxLength: 160
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,19 @@ properties:
- $ref: 'connector_properties_servicenow_sir.yaml'
- $ref: 'connector_properties_swimlane.yaml'
description:
description: The description for the case.
type: string
maxLength: 30000
$ref: 'case_description.yaml'
owner:
$ref: 'owners.yaml'
settings:
$ref: 'settings.yaml'
severity:
$ref: 'severity_property.yaml'
$ref: 'case_severity.yaml'
tags:
description: The words and phrases that help categorize cases. It can be an empty array.
type: array
maxItems: 200
items:
type: string
maxLength: 256
$ref: 'case_tags.yaml'
category:
description: A word or phrase that categorizes the case.
type: string
maxLength: 50
$ref: 'case_category.yaml'
title:
description: A title for the case.
type: string
maxLength: 160
$ref: 'case_title.yaml'
customFields:
type: array
description: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ properties:
settings:
$ref: 'settings.yaml'
severity:
$ref: 'severity_property.yaml'
$ref: 'case_severity.yaml'
status:
$ref: 'status.yaml'
$ref: 'case_status.yaml'
tags:
type: array
items:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: object
properties:
severity:
$ref: 'severity_property.yaml'
$ref: 'case_severity.yaml'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type: object
properties:
status:
$ref: 'status.yaml'
$ref: 'case_status.yaml'
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ properties:
$ref: 'case_configure_customfields.yaml'
owner:
$ref: 'owners.yaml'
templates:
$ref: 'templates.yaml'
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: >
The words and phrases that help categorize templates. It can be an empty array.
type: array
maxItems: 200
items:
type: string
maxLength: 256
Loading

0 comments on commit 35ee0cc

Please sign in to comment.