Skip to content

Commit

Permalink
[OAS] Custom fields in case APIs (elastic#169327)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Oct 23, 2023
1 parent 88beee9 commit 1659434
Show file tree
Hide file tree
Showing 64 changed files with 2,409 additions and 1,812 deletions.
2,047 changes: 1,123 additions & 924 deletions x-pack/plugins/cases/docs/openapi/bundled.json

Large diffs are not rendered by default.

1,324 changes: 814 additions & 510 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 @@ -6,7 +6,7 @@ value:
type: user
owner: cases
comment: A new comment.
created_at: '2022-06-02T00:49:47.716Z'
created_at: '2022-10-02T00:49:47.716Z'
created_by:
username: elastic
email: null
Expand All @@ -19,6 +19,15 @@ value:
tags:
- tag 1
description: A case description.
category: null
assignees: []
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
type: text
value: Field value
- key: fcc6840d-eb14-42df-8aaf-232201a705ec
type: toggle
value: true
settings:
syncAlerts: false
owner: cases
Expand All @@ -31,12 +40,14 @@ value:
username: elastic
full_name: null
email: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
status: open
updated_at: '2022-06-03T00:49:47.716Z'
updated_by:
username: elastic
email: null
full_name: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
connector:
id: none
name: none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,12 @@ value:
"settings": {
"syncAlerts": true
},
"owner": "cases"
"owner": "cases",
"customFields": [
{
"type": "text",
"key": "d312efda-ec2b-42ec-9e2c-84981795c581",
"value": "My field value"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,32 @@ value:
totalAlerts: 0
id: 66b9aa00-94fa-11ea-9f74-e7e108796192
version: WzUzMiwxXQ==
totalComment: 1
totalComment: 0
title: Case title 1
tags:
- tag 1
assignees: []
description: A case description.
settings:
syncAlerts: false
syncAlerts: true
owner: cases
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
type: text
value: My field value
- key: fcc6840d-eb14-42df-8aaf-232201a705ec
type: toggle
value: null
duration: null
severity: low
closed_at: null
closed_by: null
created_at: '2022-03-24T00:37:03.906Z'
created_at: '2022-10-13T15:33:50.604Z'
created_by:
username: elastic
full_name: null
email: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
status: open
updated_at: null
updated_by: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,53 @@ summary: Retrieves all activity for a case
value:
page: 1
perPage: 20
total: 4
total: 3
userActions:
- id: b4cd0770-07c9-11ed-a5fd-47154cb8767e
action: create
comment_id: 578608d0-03b1-11ed-920c-974bfa104448
created_at: 2022-07-20T01:17:22.150Z
comment_id: null
created_at: 2023-10-20T01:17:22.150Z
created_by:
username: elastic
email: null
full_name: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
owner: cases
payload:
assignees:
assignees: []
connector:
name: none
type: .none
fields: null
id: none
description: test
description: A case description.
tags:
- mine
title: test-case
- tag 1
title: Case title 1
owner: cases
settings:
syncAlerts: false
severity: low
status: open
type: create_case
category: null
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
type: text
value: My field value
- key: fcc6840d-eb14-42df-8aaf-232201a705ec
type: toggle
value: null
version: WzM1ODg4LDFd
type: comment
type: create_case
- id: 57af14a0-03b1-11ed-920c-974bfa104448
action: create
comment_id: 578608d0-03b1-11ed-920c-974bfa104448
created_at: 2022-07-14T20:12:53.354Z
created_at: 2023-10-14T20:12:53.354Z
created_by:
username: elastic
email: null
full_name: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
owner: cases
payload:
comment: A new comment
Expand All @@ -50,7 +59,7 @@ value:
- id: 573c6980-6123-11ed-aa41-81a0a61fe447
action: add
comment_id: null
created_at: 2022-07-20T01:10:28.238Z
created_at: 2023-10-20T01:10:28.238Z
created_by:
username: elastic
email: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,39 @@ value:
"description": "Case description",
"settings": { "syncAlerts": true },
"owner": "cases",
"customFields": [
{
"type": "text",
"key": "d312efda-ec2b-42ec-9e2c-84981795c581",
"value": "My field value"
},
{
"key": "fcc6840d-eb14-42df-8aaf-232201a705ec",
"type": "toggle",
"value": null
}
],
"duration": null,
"severity": "low",
"closed_at": null,
"closed_by": null,
"created_at": "2022-05-12T00:16:36.371Z",
"created_at": "2023-10-12T00:16:36.371Z",
"created_by": {
"email": null,
"full_name": null,
"username": "elastic"
"username": "elastic",
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"status": "open",
"updated_at": "2022-05-12T00:27:58.162Z",
"updated_at": "2023-10-12T00:27:58.162Z",
"updated_by": {
"email": null,
"full_name": null,
"username": "elastic"
"username": "elastic",
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"assignees": [],
"category": null,
"connector": {
"id": "none",
"name": "none",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
summary: Get the case configuration.
value:
- id: 856ee650-6c82-11ee-a20a-6164169afa58
closure_type: close-by-user
customFields:
- key: d312efda-ec2b-42ec-9e2c-84981795c581
label: my-text-field
required: false
type: text
owner: cases
created_at: 2023-06-01T17:07:17.767Z
created_by:
username: elastic
email: null
full_name: null
updated_at: null
updated_by: null
connector:
id: none
name: none
type: .none
fields: null
mappings: []
version: WzUxLDRd
error: null
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ value:
"type":"user",
"owner":"cases",
"comment":"A new comment",
"created_at":"2022-07-13T15:40:32.335Z",
"created_at":"2023-10-13T15:40:32.335Z",
"created_by":{
"email":null,
"full_name":null,
"username":"elastic"
"username":"elastic",
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"pushed_at":null,
"pushed_by":null,
Expand All @@ -26,15 +27,38 @@ value:
"tags":["tag 1"],
"settings":{"syncAlerts":true},
"owner":"cases",
"customFields": [
{
"type": "text",
"key": "d312efda-ec2b-42ec-9e2c-84981795c581",
"value": "My field value"
},
{
"key": "fcc6840d-eb14-42df-8aaf-232201a705ec",
"type": "toggle",
"value": null
}
],
"description":"A case description",
"duration":null,
"severity":"low",
"closed_at":null,
"closed_by":null,
"created_at":"2022-07-13T15:33:50.604Z",
"created_by":{"username":"elastic","email":null,"full_name":null},"status":"open",
"updated_at":"2022-07-13T15:40:32.335Z",
"updated_by":{"full_name":null,"email":null,"username":"elastic"},
"created_at":"2023-10-13T15:33:50.604Z",
"created_by":{
"username":"elastic",
"email":null,
"full_name":null,
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"status":"open",
"updated_at":"2023-10-13T15:40:32.335Z",
"updated_by":{
"full_name":null,
"email":null,
"username":"elastic",
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"assignees":[{"uid":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"}],
"connector":{
"id":"none",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ value:
"type":"user",
"owner":"cases",
"comment":"A new comment",
"created_at":"2022-07-07T19:32:13.104Z",
"created_at":"2023-10-07T19:32:13.104Z",
"created_by":{
"email":null,
"full_name":null,
"username":"elastic"
"username":"elastic",
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"pushed_at":null,
"pushed_by":null,
Expand Down
Loading

0 comments on commit 1659434

Please sign in to comment.