Skip to content

Commit

Permalink
Add operationId to cases openAPI specs (elastic#136161) (elastic#136298)
Browse files Browse the repository at this point in the history
(cherry picked from commit 92a516a)

Co-authored-by: Lisa Cawley <[email protected]>
  • Loading branch information
kibanamachine and lcawl authored Jul 13, 2022
1 parent 088e6fc commit 2efa79a
Show file tree
Hide file tree
Showing 23 changed files with 163 additions and 52 deletions.
68 changes: 51 additions & 17 deletions x-pack/plugins/cases/docs/openapi/bundled.json

Large diffs are not rendered by default.

70 changes: 53 additions & 17 deletions x-pack/plugins/cases/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ servers:
paths:
/api/cases:
post:
summary: Creates a case.
summary: Creates a case in the default space.
operationId: createCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -411,7 +412,8 @@ paths:
servers:
- url: https://localhost:5601
delete:
summary: Deletes one or more cases.
summary: Deletes one or more cases from the default space.
operationId: deleteCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -436,7 +438,8 @@ paths:
servers:
- url: https://localhost:5601
patch:
summary: Updates one or more cases.
summary: Updates one or more cases in the default space.
operationId: updateCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -839,7 +842,8 @@ paths:
- url: https://localhost:5601
/api/cases/_find:
get:
summary: Retrieves a paginated subset of cases.
summary: Retrieves a paginated subset of cases from the default space.
operationId: getCasesDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -1230,7 +1234,8 @@ paths:
- url: https://localhost:5601
/api/cases/alerts/{alertId}:
get:
summary: Returns the cases associated with a specific alert.
summary: Returns the cases associated with a specific alert in the default space.
operationId: getCasesByAlertDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -1269,7 +1274,8 @@ paths:
get:
summary: >-
Retrieves external connection details, such as the closure type and
default connector for cases.
default connector for cases in the default space.
operationId: getCaseConfigurationDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -1455,7 +1461,8 @@ paths:
post:
summary: >-
Sets external connection details, such as the closure type and default
connector for cases.
connector for cases in the default space.
operationId: setCaseConfigurationDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -1776,7 +1783,8 @@ paths:
patch:
summary: >-
Updates external connection details, such as the closure type and
default connector for cases.
default connector for cases in the default space.
operationId: updateCaseConfigurationDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2086,7 +2094,8 @@ paths:
- url: https://localhost:5601
/api/cases/configure/connectors/_find:
get:
summary: Retrieves information about connectors.
summary: Retrieves information about connectors for cases in the default space.
operationId: getCaseConnectorsDefaultSpace
description: >
In particular, only the connectors that are supported for use in cases
are returned. You must have `read` privileges for the **Actions and
Expand Down Expand Up @@ -2136,7 +2145,10 @@ paths:
- url: https://localhost:5601
/api/cases/reporters:
get:
summary: Returns information about the users who opened cases.
summary: >-
Returns information about the users who opened cases in the default
space.
operationId: getCaseReportersDefaultCase
description: >
You must have read privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2209,7 +2221,8 @@ paths:
- url: https://localhost:5601
/api/cases/tags:
get:
summary: Aggregates and returns a list of case tags.
summary: Aggregates and returns a list of case tags in the default space.
operationId: getCaseTagsDefaultSpace
description: >
You must have read privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2248,7 +2261,8 @@ paths:
- url: https://localhost:5601
/api/cases/{caseId}/comments:
post:
summary: Adds a comment or alert to a case.
summary: Adds a comment or alert to a case in the default space.
operationId: addCaseCommentDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2508,7 +2522,8 @@ paths:
servers:
- url: https://localhost:5601
delete:
summary: Deletes all comments and alerts from a case.
summary: Deletes all comments and alerts from a case in the default space.
operationId: deleteCaseCommentsDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -2525,7 +2540,8 @@ paths:
servers:
- url: https://localhost:5601
patch:
summary: Updates a comment or alert in a case.
summary: Updates a comment or alert in a case in the default space.
operationId: updateCaseCommentDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2786,7 +2802,8 @@ paths:
servers:
- url: https://localhost:5601
get:
summary: Retrieves all the comments from a case.
summary: Retrieves all the comments from a case in the default space.
operationId: getAllCaseCommentsDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2816,7 +2833,8 @@ paths:
- url: https://localhost:5601
/api/cases/{caseId}/comments/{commentId}:
delete:
summary: Deletes a comment or alert from a case.
summary: Deletes a comment or alert from a case in the default space.
operationId: deleteCaseCommentDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -2834,7 +2852,8 @@ paths:
servers:
- url: https://localhost:5601
get:
summary: Retrieves a comment from a case.
summary: Retrieves a comment from a case in the default space.
operationId: getCaseCommentDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -2865,6 +2884,7 @@ paths:
/s/{spaceId}/api/cases:
post:
summary: Creates a case.
operationId: createCase
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the
Expand Down Expand Up @@ -3259,6 +3279,7 @@ paths:
- url: https://localhost:5601
delete:
summary: Deletes one or more cases.
operationId: deleteCase
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the
Expand Down Expand Up @@ -3286,6 +3307,7 @@ paths:
- url: https://localhost:5601
patch:
summary: Updates one or more cases.
operationId: updateCase
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the
Expand Down Expand Up @@ -3691,6 +3713,7 @@ paths:
/s/{spaceId}/api/cases/_find:
get:
summary: Retrieves a paginated subset of cases.
operationId: getCases
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -4085,6 +4108,7 @@ paths:
/s/{spaceId}/api/cases/alerts/{alertId}:
get:
summary: Returns the cases associated with a specific alert.
operationId: getCasesByAlert
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -4125,6 +4149,7 @@ paths:
summary: >-
Retrieves external connection details, such as the closure type and
default connector for cases.
operationId: getCaseConfiguration
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -4312,6 +4337,7 @@ paths:
summary: >-
Sets external connection details, such as the closure type and default
connector for cases.
operationId: setCaseConfiguration
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -4634,6 +4660,7 @@ paths:
summary: >-
Updates external connection details, such as the closure type and
default connector for cases.
operationId: updateCaseConfiguration
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -4945,6 +4972,7 @@ paths:
/s/{spaceId}/api/cases/configure/connectors/_find:
get:
summary: Retrieves information about connectors.
operationId: getCaseConnectors
description: >
In particular, only the connectors that are supported for use in cases
are returned. You must have `read` privileges for the **Actions and
Expand Down Expand Up @@ -4997,6 +5025,7 @@ paths:
/s/{spaceId}/api/cases/reporters:
get:
summary: Returns information about the users who opened cases.
operationId: getCaseReporters
description: >
You must have read privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -5072,6 +5101,7 @@ paths:
/s/{spaceId}/api/cases/tags:
get:
summary: Aggregates and returns a list of case tags.
operationId: getCaseTags
description: >
You must have read privileges for the **Cases*** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -5112,6 +5142,7 @@ paths:
/s/{spaceId}/api/cases/{caseId}/comments:
post:
summary: Adds a comment or alert to a case.
operationId: addCaseComment
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -5373,6 +5404,7 @@ paths:
- url: https://localhost:5601
delete:
summary: Deletes all comments and alerts from a case.
operationId: deleteCaseComments
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -5391,6 +5423,7 @@ paths:
- url: https://localhost:5601
patch:
summary: Updates a comment or alert in a case.
operationId: updateCaseComment
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -5653,6 +5686,7 @@ paths:
- url: https://localhost:5601
get:
summary: Retrieves all the comments from a case.
operationId: getAllCaseComments
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -5684,6 +5718,7 @@ paths:
/s/{spaceId}/api/cases/{caseId}/comments/{commentId}:
delete:
summary: Deletes a comment or alert from a case.
operationId: deleteCaseComment
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -5703,6 +5738,7 @@ paths:
- url: https://localhost:5601
get:
summary: Retrieves a comment from a case.
operationId: getCaseComment
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security*** section of the
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
summary: Get the number of cases in each state.
value:
{
"count_open_cases": 27,
"count_in_progress_cases": 50,
"count_closed_cases": 198
}
9 changes: 6 additions & 3 deletions x-pack/plugins/cases/docs/openapi/paths/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
post:
summary: Creates a case.
summary: Creates a case in the default space.
operationId: createCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down Expand Up @@ -73,7 +74,8 @@ post:
- url: https://localhost:5601

delete:
summary: Deletes one or more cases.
summary: Deletes one or more cases from the default space.
operationId: deleteCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -97,7 +99,8 @@ delete:
- url: https://localhost:5601

patch:
summary: Updates one or more cases.
summary: Updates one or more cases in the default space.
operationId: updateCaseDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
get:
summary: Retrieves a paginated subset of cases.
summary: Retrieves a paginated subset of cases from the default space.
operationId: getCasesDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
get:
summary: Returns the cases associated with a specific alert.
summary: Returns the cases associated with a specific alert in the default space.
operationId: getCasesByAlertDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
get:
summary: Retrieves external connection details, such as the closure type and default connector for cases.
summary: Retrieves external connection details, such as the closure type and default connector for cases in the default space.
operationId: getCaseConfigurationDefaultSpace
description: >
You must have `read` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand All @@ -24,7 +25,8 @@ get:
- url: https://localhost:5601

post:
summary: Sets external connection details, such as the closure type and default connector for cases.
summary: Sets external connection details, such as the closure type and default connector for cases in the default space.
operationId: setCaseConfigurationDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
get:
summary: Retrieves information about connectors.
summary: Retrieves information about connectors for cases in the default space.
operationId: getCaseConnectorsDefaultSpace
description: >
In particular, only the connectors that are supported for use in cases are
returned. You must have `read` privileges for the **Actions and Connectors**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
patch:
summary: Updates external connection details, such as the closure type and default connector for cases.
summary: Updates external connection details, such as the closure type and default connector for cases in the default space.
operationId: updateCaseConfigurationDefaultSpace
description: >
You must have `all` privileges for the **Cases** feature in the
**Management**, **Observability**, or **Security** section of the Kibana
Expand Down
Loading

0 comments on commit 2efa79a

Please sign in to comment.