Skip to content

Commit

Permalink
[OAS] Fix examples in Webhook - Case Management connector (#182311)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed May 9, 2024
1 parent 49a5d5e commit 8dcd5fd
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 97 deletions.
34 changes: 3 additions & 31 deletions x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -2340,11 +2340,7 @@
"type": "string",
"description": "A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n",
"examples": [
{
"body": {
"[object Object]": null
}
}
"{\"body\": {{{case.comment}}}}"
]
},
"createCommentMethod": {
Expand All @@ -2368,19 +2364,7 @@
"type": "string",
"description": "A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"createIncidentMethod": {
Expand Down Expand Up @@ -2425,19 +2409,7 @@
"type": "string",
"description": "The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"updateIncidentMethod": {
Expand Down
19 changes: 3 additions & 16 deletions x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1574,8 +1574,7 @@ components:
description: |
A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.
examples:
- body:
'[object Object]': null
- '{"body": {{{case.comment}}}}'
createCommentMethod:
type: string
description: |
Expand All @@ -1596,13 +1595,7 @@ components:
description: |
A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
createIncidentMethod:
type: string
description: |
Expand Down Expand Up @@ -1641,13 +1634,7 @@ components:
description: |
The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
updateIncidentMethod:
type: string
description: |
Expand Down
34 changes: 3 additions & 31 deletions x-pack/plugins/actions/docs/openapi/bundled_serverless.json
Original file line number Diff line number Diff line change
Expand Up @@ -1308,11 +1308,7 @@
"type": "string",
"description": "A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.\n",
"examples": [
{
"body": {
"[object Object]": null
}
}
"{\"body\": {{{case.comment}}}}"
]
},
"createCommentMethod": {
Expand All @@ -1336,19 +1332,7 @@
"type": "string",
"description": "A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"createIncidentMethod": {
Expand Down Expand Up @@ -1393,19 +1377,7 @@
"type": "string",
"description": "The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.\n",
"examples": [
{
"fields": {
"summary": {
"[object Object]": null
},
"description": {
"[object Object]": null
},
"labels": {
"[object Object]": null
}
}
}
"{\"fields\": {\"summary\": {{{case.title}}},\"description\": {{{case.description}}},\"labels\": {{{case.tags}}}}}"
]
},
"updateIncidentMethod": {
Expand Down
19 changes: 3 additions & 16 deletions x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -921,8 +921,7 @@ components:
description: |
A JSON payload sent to the create comment URL to create a case comment. You can use variables to add Kibana Cases data to the payload. The required variable is `case.comment`. Due to Mustache template variables (the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated once the Mustache variables have been placed when the REST method runs. Manually ensure that the JSON is valid, disregarding the Mustache variables, so the later validation will pass.
examples:
- body:
'[object Object]': null
- '{"body": {{{case.comment}}}}'
createCommentMethod:
type: string
description: |
Expand All @@ -943,13 +942,7 @@ components:
description: |
A JSON payload sent to the create case URL to create a case. You can use variables to add case data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
createIncidentMethod:
type: string
description: |
Expand Down Expand Up @@ -988,13 +981,7 @@ components:
description: |
The JSON payload sent to the update case URL to update the case. You can use variables to add Kibana Cases data to the payload. Required variables are `case.title` and `case.description`. Due to Mustache template variables (which is the text enclosed in triple braces, for example, `{{{case.title}}}`), the JSON is not validated when you create the connector. The JSON is validated after the Mustache variables have been placed when REST method runs. Manually ensure that the JSON is valid to avoid future validation errors; disregard Mustache variables during your review.
examples:
- fields:
summary:
'[object Object]': null
description:
'[object Object]': null
labels:
'[object Object]': null
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
updateIncidentMethod:
type: string
description: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ properties:
placed when the REST method runs. Manually ensure that the JSON is valid,
disregarding the Mustache variables, so the later validation will pass.
examples:
- {"body": {{{case.comment}}}}
- '{"body": {{{case.comment}}}}'
createCommentMethod:
type: string
description: >
Expand Down Expand Up @@ -55,7 +55,7 @@ properties:
placed when REST method runs. Manually ensure that the JSON is valid to
avoid future validation errors; disregard Mustache variables during your review.
examples:
- {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
createIncidentMethod:
type: string
description: >
Expand Down Expand Up @@ -112,7 +112,7 @@ properties:
placed when REST method runs. Manually ensure that the JSON is valid to
avoid future validation errors; disregard Mustache variables during your review.
examples:
- {"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}
- '{"fields": {"summary": {{{case.title}}},"description": {{{case.description}}},"labels": {{{case.tags}}}}}'
updateIncidentMethod:
type: string
description: >
Expand Down

0 comments on commit 8dcd5fd

Please sign in to comment.