Skip to content

Commit

Permalink
[DOCS] Add new path specification for find comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed May 8, 2023
1 parent da58862 commit 4ea3968
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 31 deletions.
90 changes: 90 additions & 0 deletions x-pack/plugins/cases/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,65 @@
}
]
},
"/s/{spaceId}/api/cases/{caseId}/comments/_find": {
"get": {
"summary": "Retrieves all the user comments from a case.",
"operationId": "findCaseComments",
"description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n",
"tags": [
"cases"
],
"parameters": [
{
"$ref": "#/components/parameters/case_id"
},
{
"$ref": "#/components/parameters/page_index"
},
{
"$ref": "#/components/parameters/page_size"
},
{
"$ref": "#/components/parameters/sort_order"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"200": {
"description": "Indicates a successful call.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/case_response_properties"
}
}
}
},
"401": {
"description": "Authorization information is missing or invalid.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/4xx_response"
}
}
}
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/cases/{caseId}/comments/{commentId}": {
"delete": {
"summary": "Deletes a comment or alert from a case.",
Expand Down Expand Up @@ -2321,6 +2380,37 @@
"example": "9c235210-6834-11ea-a78c-6ffb38a34414"
}
},
"page_index": {
"in": "query",
"name": "page",
"required": false,
"schema": {
"type": "integer",
"default": 1
}
},
"page_size": {
"in": "query",
"name": "perPage",
"description": "The number of items to return",
"required": false,
"schema": {
"type": "integer",
"default": 20
}
},
"sort_order": {
"in": "query",
"name": "sortOrder",
"required": false,
"schema": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
"comment_id": {
"in": "path",
"name": "commentId",
Expand Down
55 changes: 55 additions & 0 deletions x-pack/plugins/cases/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1163,6 +1163,37 @@ paths:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/cases/{caseId}/comments/_find:
get:
summary: Retrieves all the user comments from a case.
operationId: findCaseComments
description: |
You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.
tags:
- cases
parameters:
- $ref: '#/components/parameters/case_id'
- $ref: '#/components/parameters/page_index'
- $ref: '#/components/parameters/page_size'
- $ref: '#/components/parameters/sort_order'
- $ref: '#/components/parameters/space_id'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '#/components/schemas/case_response_properties'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/4xx_response'
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/cases/{caseId}/comments/{commentId}:
delete:
summary: Deletes a comment or alert from a case.
Expand Down Expand Up @@ -1455,6 +1486,30 @@ components:
schema:
type: string
example: 9c235210-6834-11ea-a78c-6ffb38a34414
page_index:
in: query
name: page
required: false
schema:
type: integer
default: 1
page_size:
in: query
name: perPage
description: The number of items to return
required: false
schema:
type: integer
default: 20
sort_order:
in: query
name: sortOrder
required: false
schema:
type: string
enum:
- asc
- desc
comment_id:
in: path
name: commentId
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/cases/docs/openapi/entrypoint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ paths:
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml'
'/s/{spaceId}/api/cases/{caseId}/comments':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments.yaml'
'/s/{spaceId}/api/cases/{caseId}/comments/_find':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml'
'/s/{spaceId}/api/cases/{caseId}/comments/{commentId}':
$ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml'
'/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,36 +138,5 @@ get:
servers:
- url: https://localhost:5601

find:
summary: Retrieves all the user comments from a case.
operationId: findCaseComments
description: >
Returns a paginated list of all user comments associated with a case.
You must have `read` privileges for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases with the comments you're seeking.
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/page_index.yaml'
- $ref: '../components/parameters/page_size.yaml'
- $ref: '../components/parameters/sort_order.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601

servers:
- url: https://localhost:5601
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
get:
summary: Retrieves all the user comments from a case.
operationId: findCaseComments
description: >
You must have `read` privileges for the **Cases** feature in the **Management**,
**Observability**, or **Security** section of the Kibana feature privileges,
depending on the owner of the cases with the comments you're seeking.
tags:
- cases
parameters:
- $ref: '../components/parameters/case_id.yaml'
- $ref: '../components/parameters/page_index.yaml'
- $ref: '../components/parameters/page_size.yaml'
- $ref: '../components/parameters/sort_order.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
content:
application/json:
schema:
$ref: '../components/schemas/case_response_properties.yaml'
'401':
description: Authorization information is missing or invalid.
content:
application/json:
schema:
$ref: '../components/schemas/4xx_response.yaml'
servers:
- url: https://localhost:5601

servers:
- url: https://localhost:5601

0 comments on commit 4ea3968

Please sign in to comment.