Skip to content

Commit

Permalink
[8.5] [DOCS] Automate final case APIs (#145007) (#145272)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Nov 15, 2022
1 parent 382984f commit fdaa631
Show file tree
Hide file tree
Showing 20 changed files with 2,866 additions and 11,706 deletions.
3,440 changes: 0 additions & 3,440 deletions x-pack/plugins/cases/docs/openapi/bundled-min.json

This file was deleted.

2,389 changes: 0 additions & 2,389 deletions x-pack/plugins/cases/docs/openapi/bundled-min.yaml

This file was deleted.

4,350 changes: 1,516 additions & 2,834 deletions x-pack/plugins/cases/docs/openapi/bundled.json

Large diffs are not rendered by default.

4,111 changes: 1,234 additions & 2,877 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
@@ -1,37 +1,72 @@
summary: Retrieves all activity for a case
value:
[
{
"created_at":"2022-07-14T20:11:24.947Z",
"created_by":{"username":"elastic","email":null,"full_name":null},
"owner":"cases",
"action":"create",
"payload":{
"description":"A case description",
"title":"Case title 1",
"tags":["tag 1"],
"connector":{"name":"none","type":".none","fields":null,"id":"none"},
"settings":{"syncAlerts":true},
"owner":"cases",
"severity":"low",
"status":"open"
},
"type":"create_case",
"action_id":"22fd3e30-03b1-11ed-920c-974bfa104448",
"case_id":"22df07d0-03b1-11ed-920c-974bfa104448",
"comment_id":null
},
{
"created_at":"2022-07-14T20:12:53.354Z",
"created_by":{"username":"elastic","email":null,"full_name":null},
"owner":"cases",
"action":"create",
"payload":{
"comment":{"type":"user","owner":"cases","comment":"A new comment"}
},
"type":"comment",
"action_id":"57af14a0-03b1-11ed-920c-974bfa104448",
"case_id":"22df07d0-03b1-11ed-920c-974bfa104448",
"comment_id":"578608d0-03b1-11ed-920c-974bfa104448"
}
]
value:
- action_id: b4cd0770-07c9-11ed-a5fd-47154cb8767e
action: create
case_id: 22df07d0-03b1-11ed-920c-974bfa104448
comment_id: 578608d0-03b1-11ed-920c-974bfa104448
created_at: 2022-07-20T01:17:22.150Z
created_by:
username: elastic
email: null
full_name: null
owner: cases
payload:
assignees:
connector:
name: none
type: .none
fields: null
id: none
description: test
tags:
- mine
title: test-case
owner: cases
settings:
syncAlerts: false
severity: low
status: open
type: create_case
type: comment
- action_id: 57af14a0-03b1-11ed-920c-974bfa104448
action: create
case_id: 22df07d0-03b1-11ed-920c-974bfa104448
comment_id: 578608d0-03b1-11ed-920c-974bfa104448
created_at: 2022-07-14T20:12:53.354Z
created_by:
username: elastic
email: null
full_name: null
owner: cases
payload:
comment: A new comment
owner: cases
type: user
type: comment
- action_id: 573c6980-6123-11ed-aa41-81a0a61fe447
action: add
case_id: 22df07d0-03b1-11ed-920c-974bfa104448
comment_id: null
created_at: 2022-07-20T01:10:28.238Z
created_by:
username: elastic
email: null
full_name: null
profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
owner: cases
payload:
assignees:
uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0
type: assignees
- action_id: fff460e0-07c9-11ed-a5fd-47154cb8767e
action: delete
case_id: 22df07d0-03b1-11ed-920c-974bfa104448
comment_id: null
created_at: 2022-07-20T01:19:28.238Z
created_by:
username: elastic
email: null
full_name: null
owner: cases
payload:
type: delete_case
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,7 @@ created_at:
created_by:
type: object
properties:
email:
type: string
example: null
nullable: true
full_name:
type: string
example: null
nullable: true
username:
type: string
example: elastic
$ref: 'user_properties.yaml'
error:
type: string
nullable: true
Expand Down Expand Up @@ -53,17 +43,7 @@ updated_at:
updated_by:
type: object
properties:
email:
type: string
example: null
nullable: true
full_name:
type: string
example: null
nullable: true
username:
type: string
example: elastic
$ref: 'user_properties.yaml'
nullable: true
version:
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,7 @@ required:
- version
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. You can use the get user profile API to retrieve more details.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
$ref: 'assignees.yaml'
closed_at:
type: string
format: date-time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,7 @@ required:
- title
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
$ref: 'assignees.yaml'
connector:
oneOf:
- $ref: 'connector_properties_none.yaml'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
type: object
properties:
assignees:
type: array
items:
type: object
properties:
uid:
type: string
$ref: 'assignees.yaml'
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
type: object
properties:
assignees:
$ref: 'assignees.yaml'
connector:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type: object
description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable.
nullable: true
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ properties:
type:
type: string
enum:
- user
- user
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,7 @@ properties:
- version
properties:
assignees:
type: array
description: An array containing users that are assigned to the case.
nullable: true
items:
type: object
required:
- uid
properties:
uid:
type: string
description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.
example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0
$ref: 'assignees.yaml'
connector:
oneOf:
- $ref: 'connector_properties_none.yaml'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
type: object
required:
- action
- action_id
- case_id
- comment_id
- created_at
- created_by
- owner
- payload
- type
properties:
action:
$ref: 'actions.yaml'
Expand All @@ -10,6 +20,7 @@ properties:
example: 22df07d0-03b1-11ed-920c-974bfa104448
comment_id:
type: string
nullable: true
example: 578608d0-03b1-11ed-920c-974bfa104448
created_at:
type: string
Expand All @@ -19,6 +30,10 @@ properties:
type: object
properties:
$ref: 'user_properties.yaml'
required:
- email
- full_name
- username
owner:
$ref: 'owners.yaml'
payload:
Expand All @@ -27,6 +42,7 @@ properties:
- $ref: 'payload_assignees.yaml'
- $ref: 'payload_connector.yaml'
- $ref: 'payload_create_case.yaml'
- $ref: 'payload_delete.yaml'
- $ref: 'payload_description.yaml'
- $ref: 'payload_pushed.yaml'
- $ref: 'payload_settings.yaml'
Expand All @@ -35,6 +51,5 @@ properties:
- $ref: 'payload_tags.yaml'
- $ref: 'payload_title.yaml'
- $ref: 'payload_user_comment.yaml'
nullable: true
type:
type:
$ref: 'action_types.yaml'
59 changes: 0 additions & 59 deletions x-pack/plugins/cases/docs/openapi/entrypoint-min.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ get:
'200':
description: Indicates a successful call.
content:
application/json; charset=utf-8:
application/json:
schema:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ get:
'200':
description: Indicates a successful call.
content:
application/json; charset=utf-8:
application/json:
schema:
type: array
items:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ get:
items:
$ref: '../components/schemas/alert_response_properties.yaml'
examples:
createCaseCommentResponse:
getCaseAlertsResponse:
$ref: '../components/examples/get_case_alerts_response.yaml'
servers:
- url: https://localhost:5601
Expand Down
Loading

0 comments on commit fdaa631

Please sign in to comment.