From 22120c2eca55b93e65e9cea5e3349d005931be66 Mon Sep 17 00:00:00 2001 From: lcawl Date: Tue, 23 Jul 2024 13:13:00 -0700 Subject: [PATCH] Revert "[OAS] Migrate case APIs to v3.1.0 (#171593)" This reverts commit ea85f2a4796243d5856f6a369b5e96d1805fdda0. --- x-pack/plugins/cases/docs/openapi/README.md | 15 +----- .../components/parameters/alert_id.yaml | 3 +- .../components/parameters/case_id.yaml | 3 +- .../components/parameters/category.yaml | 3 +- .../components/parameters/comment_id.yaml | 3 +- .../parameters/configuration_id.yaml | 3 +- .../components/parameters/connector_id.yaml | 3 +- .../parameters/defaultSearchOperator.yaml | 3 +- .../openapi/components/parameters/from.yaml | 3 +- .../openapi/components/parameters/ids.yaml | 3 +- .../openapi/components/parameters/owner.yaml | 3 +- .../components/parameters/page_index.yaml | 2 - .../components/parameters/reporters.yaml | 3 +- .../components/parameters/sortField.yaml | 3 +- .../components/parameters/space_id.yaml | 3 +- .../openapi/components/parameters/status.yaml | 3 +- .../openapi/components/parameters/tags.yaml | 3 +- .../openapi/components/parameters/to.yaml | 3 +- .../parameters/user_action_types.yaml | 3 +- .../components/schemas/4xx_response.yaml | 6 +-- .../components/schemas/action_types.yaml | 3 +- .../openapi/components/schemas/actions.yaml | 3 +- .../add_alert_comment_request_properties.yaml | 3 +- .../add_user_comment_request_properties.yaml | 6 +-- .../alert_comment_response_properties.yaml | 41 ++++++---------- .../components/schemas/alert_identifiers.yaml | 3 +- .../openapi/components/schemas/assignees.yaml | 8 ++-- .../case_configure_connector_properties.yaml | 11 ++--- .../case_configure_response_properties.yaml | 39 ++++++--------- .../components/schemas/case_customfields.yaml | 5 +- .../case_response_closed_by_properties.yaml | 5 +- ...e_response_connector_field_properties.yaml | 20 ++++---- .../schemas/case_response_properties.yaml | 48 +++++++------------ .../case_response_pushed_by_properties.yaml | 5 +- .../case_response_updated_by_properties.yaml | 5 +- .../components/schemas/closure_types.yaml | 3 +- .../components/schemas/comment_types.yaml | 3 +- .../schemas/connector_properties.yaml | 39 ++++++--------- .../connector_properties_cases_webhook.yaml | 11 ++--- .../schemas/connector_properties_jira.yaml | 18 +++---- .../schemas/connector_properties_none.yaml | 17 +++---- .../connector_properties_resilient.yaml | 8 ++-- .../connector_properties_servicenow.yaml | 28 +++++------ .../connector_properties_servicenow_sir.yaml | 38 ++++++--------- .../connector_properties_swimlane.yaml | 8 ++-- .../components/schemas/connector_types.yaml | 3 +- .../components/schemas/external_service.yaml | 12 ++--- .../openapi/components/schemas/owners.yaml | 3 +- .../schemas/payload_alert_comment.yaml | 6 +-- .../schemas/payload_create_case.yaml | 3 +- .../components/schemas/payload_delete.yaml | 7 ++- .../components/schemas/payload_tags.yaml | 3 +- .../docs/openapi/components/schemas/rule.yaml | 6 +-- .../components/schemas/rule_properties.yaml | 6 +-- .../openapi/components/schemas/settings.yaml | 3 +- ...date_alert_comment_request_properties.yaml | 9 ++-- .../update_case_configuration_request.yaml | 3 +- ...pdate_user_comment_request_properties.yaml | 12 ++--- ...user_actions_find_response_properties.yaml | 20 +++----- .../user_actions_response_properties.yaml | 17 +++---- .../user_comment_response_properties.yaml | 31 +++++------- .../components/schemas/user_properties.yaml | 29 +++++------ .../cases/docs/openapi/entrypoint.yaml | 4 +- .../paths/api@cases@alerts@{alertid}.yaml | 2 +- ...caseid}@connector@{connectorid}@_push.yaml | 5 +- ...@{spaceid}@api@cases@alerts@{alertid}.yaml | 2 +- ...caseid}@connector@{connectorid}@_push.yaml | 5 +- ...api@cases@{caseid}@user_actions@_find.yaml | 1 + 68 files changed, 233 insertions(+), 411 deletions(-) diff --git a/x-pack/plugins/cases/docs/openapi/README.md b/x-pack/plugins/cases/docs/openapi/README.md index fedb9635abc82..6de117e966fe0 100644 --- a/x-pack/plugins/cases/docs/openapi/README.md +++ b/x-pack/plugins/cases/docs/openapi/README.md @@ -13,22 +13,11 @@ A guide about the openApi specification can be found at [https://swagger.io/docs ## Tools -It is possible to validate the docs before bundling them with the following -command in the `x-pack/plugins/cases/docs/openapi/` folder: - - ```bash - npx swagger-cli validate entrypoint.yaml - ``` - -Then you can generate the `bundled` files by running the following commands: +Generate the `bundled` files by running the following commands: ```bash npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json ``` -After generating the json bundle ensure that it is also valid by running the following command: - - ```bash - npx @redocly/cli lint bundled.json - ``` +Then join these files with the rest of the Kibana APIs per `oas_docs/README.md` diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml index 24c728f017d12..8677b327b91be 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the alert. required: true schema: type: string - examples: - - 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 \ No newline at end of file + example: 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml index de7cfebbeb6bf..eebde85823746 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml @@ -4,5 +4,4 @@ description: The identifier for the case. To retrieve case IDs, use the find cas required: true schema: type: string - examples: - - 9c235210-6834-11ea-a78c-6ffb38a34414 \ No newline at end of file + example: 9c235210-6834-11ea-a78c-6ffb38a34414 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml index 8d28898750ae2..8bf20d9aa2450 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml @@ -8,5 +8,4 @@ schema: items: type: string maxItems: 100 - examples: - - [ my-category ] \ No newline at end of file +example: my-category \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml index 852ad328c6c4e..a46f47569e8d2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml @@ -6,5 +6,4 @@ description: > required: true schema: type: string - examples: - - '71ec1870-725b-11ea-a0b2-c51ea50a58e2' \ No newline at end of file + example: '71ec1870-725b-11ea-a0b2-c51ea50a58e2' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml index 884821a79952f..65cce12afaa92 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the configuration. required: true schema: type: string - examples: - - 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 \ No newline at end of file + example: 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml index 7fc146b22126c..71cdc7191cfa1 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the connector. To retrieve connector IDs, use the required: true schema: type: string - examples: - - abed3a70-71bd-11ea-a0b2-c51ea50a58e2 \ No newline at end of file + example: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml index cd3cf8cb1c005..8e9004c859b46 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml @@ -4,5 +4,4 @@ description: he default operator to use for the simple_query_string. schema: type: string default: OR - examples: - - OR \ No newline at end of file +example: OR \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml index bf92b68ad6ba3..6f9a24dae5956 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml @@ -5,5 +5,4 @@ description: > The date must be specified as a KQL data range or date match expression. schema: type: string - examples: - - now-1d \ No newline at end of file + example: now-1d \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml index acd48cd0955a2..c84ec64ab2a53 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml @@ -10,5 +10,4 @@ schema: type: string minItems: 1 maxItems: 100 - examples: - - [ d4e7abb0-b462-11ec-9a8d-698504725a43 ] +example: d4e7abb0-b462-11ec-9a8d-698504725a43 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml index d4f40a4403723..3c5e511742bf2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml @@ -10,5 +10,4 @@ schema: - type: array items: $ref: '../schemas/owners.yaml' - examples: - - [ cases ] \ No newline at end of file +example: cases \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml index 8ac69a105d15b..9176d3b62094e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml @@ -5,5 +5,3 @@ required: false schema: type: integer default: 1 - examples: - - 1 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml index 3d4d24cafd3ca..db28a6c48ae02 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml @@ -8,5 +8,4 @@ schema: items: type: string maxItems: 100 - examples: - - [ elastic ] +example: elastic diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml index d5a49214e9d90..9df834cf9f5ac 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml @@ -12,5 +12,4 @@ schema: - status - severity default: createdAt - examples: - - updatedAt \ No newline at end of file +example: updatedAt \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml index 45787e844caec..0a9fba457e3e7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the space. If `/s/` and the identifier are omitte required: true schema: type: string - examples: - - default + example: default diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml index b90edcd58286b..0517e7516a87f 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml @@ -7,5 +7,4 @@ schema: - closed - in-progress - open - examples: - - open \ No newline at end of file +example: open \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml index b1732fb124577..d899edbcc38eb 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml @@ -8,5 +8,4 @@ schema: items: type: string maxItems: 100 - examples: - - [ tag-1 ] +example: tag-1 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml index dd326cabd8dca..c176ce8407803 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml @@ -5,5 +5,4 @@ description: > The date must be specified as a KQL data range or date match expression. schema: type: string - examples: - - now+1d \ No newline at end of file +example: now+1d \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml index 320dc67b631ca..2b04b7c806620 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml @@ -21,5 +21,4 @@ schema: - tags - title - user - examples: - - [ create_case ] \ No newline at end of file +example: create_case \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml index 72d3bd82cbf60..75d0ac39903bf 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml @@ -3,11 +3,9 @@ title: Unsuccessful cases API response properties: error: type: string - examples: - - Unauthorized + example: Unauthorized message: type: string statusCode: type: integer - examples: - - 401 \ No newline at end of file + example: 401 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml index 140b606b44565..3568008b07000 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml @@ -13,5 +13,4 @@ enum: - status - settings - severity -examples: - - create_case \ No newline at end of file +example: create_case \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml index f2b20517efd54..1638ed67c78e2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml @@ -5,5 +5,4 @@ enum: - delete - push_to_service - update -examples: - - create \ No newline at end of file +example: create \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml index 192e12f62857c..c99ebb19cc818 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml @@ -19,7 +19,6 @@ properties: type: description: The type of comment. type: string - examples: - - alert + example: alert enum: - alert \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml index a0740dbdc51bc..beac63c377ade 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml @@ -6,15 +6,13 @@ properties: description: The new comment. It is required only when `type` is `user`. type: string maxLength: 30000 - examples: - - A new comment. + example: A new comment. owner: $ref: 'owners.yaml' type: type: string description: The type of comment. - examples: - - user + example: user enum: - user required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml index 3305732cee6ec..443d9dcc55523 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml @@ -7,13 +7,11 @@ properties: type: array items: type: string - examples: - - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - examples: - - 2023-11-06T19:29:38.424Z + example: 2023-11-06T19:29:38.424Z created_by: type: object required: @@ -24,52 +22,44 @@ properties: $ref: 'user_properties.yaml' id: type: string - examples: - - 73362370-ab1a-11ec-985f-97e55adae8b9 + example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: type: array items: type: string - examples: - - .internal.alerts-security.alerts-default-000001 + example: .internal.alerts-security.alerts-default-000001 owner: $ref: 'owners.yaml' pushed_at: - type: - - "string" - - "null" + type: string format: date-time - examples: - - null + example: null + nullable: true pushed_by: - type: - - "object" - - "null" + type: object required: - email - full_name - username properties: $ref: 'user_properties.yaml' + nullable: true rule: type: object properties: $ref: 'rule_properties.yaml' type: type: string - examples: - - alert + example: alert enum: - alert updated_at: - type: - - "string" - - "null" + type: string format: date-time + nullable: true updated_by: - type: - - "object" - - "null" + type: object + nullable: true required: - email - full_name @@ -78,5 +68,4 @@ properties: $ref: 'user_properties.yaml' version: type: string - examples: - - WzMwNDgsMV0= \ No newline at end of file + example: WzMwNDgsMV0= \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml index 5a8f821931f57..cca8eb74f5019 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml @@ -13,5 +13,4 @@ oneOf: type: string maxItems: 1000 x-technical-preview: true -examples: - - 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 \ No newline at end of file +example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml index 4109c4d476909..5b4e18517bd43 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml @@ -1,8 +1,7 @@ -type: - - "array" - - "null" +type: array description: An array containing users that are assigned to the case. maxItems: 10 +nullable: true items: type: object required: @@ -11,5 +10,4 @@ items: uid: type: string description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API. - examples: - - u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 \ No newline at end of file + example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml index 3873a8ae9e0f6..ce1669c37941e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml @@ -1,17 +1,14 @@ fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - "object" - - "null" + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: 'connector_types.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml index 1085e1f8ef974..07a94129b0180 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml @@ -7,8 +7,7 @@ connector: created_at: type: string format: date-time - examples: - - 2022-06-01T17:07:17.767Z + example: 2022-06-01T17:07:17.767Z created_by: type: object required: @@ -25,15 +24,12 @@ customFields: properties: $ref: 'case_configure_customfields.yaml' error: - type: - - 'string' - - 'null' - examples: - - null + type: string + nullable: true + example: null id: type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 mappings: type: array items: @@ -41,38 +37,31 @@ mappings: properties: action_type: type: string - examples: - - overwrite + example: overwrite source: type: string - examples: - - title + example: title target: type: string - examples: - - summary + example: summary owner: $ref: 'owners.yaml' templates: $ref: 'templates.yaml' updated_at: - type: - - 'string' - - 'null' + type: string format: date-time - examples: - - 2022-06-01T19:58:48.169Z + nullable: true + example: 2022-06-01T19:58:48.169Z updated_by: - type: - - 'object' - - 'null' + type: object required: - email - full_name - username properties: $ref: 'user_properties.yaml' + nullable: true version: type: string - examples: - - WzIwNzMsMV0= + example: WzIwNzMsMV0= diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml index 5a4c9f26e09b2..4170833e818cc 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml @@ -18,9 +18,8 @@ value: However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. oneOf: - - type: - - "string" - - "null" + - type: string minLength: 1 maxLength: 160 + nullable: true - type: boolean diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml index 26b3eaa7395eb..95bd14e4957a3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml @@ -1,7 +1,6 @@ title: Case response properties for closed_by -type: - - "object" - - "null" +type: object +nullable: true properties: $ref: 'user_properties.yaml' required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml index 18f79997e31ce..1ac30d325d45e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml @@ -1,8 +1,7 @@ title: Case response properties for connector fields -type: - - "object" - - "null" +type: object description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. +nullable: true properties: caseId: description: The case identifier for Swimlane connectors. @@ -12,9 +11,8 @@ properties: type: string destIp: description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true impact: description: The effect an incident had on business for ServiceNow ITSM connectors. type: string @@ -28,14 +26,12 @@ properties: type: string malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task for Jira connectors. type: string diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml index a0ef24983502f..0c4560dc6362a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml @@ -26,15 +26,13 @@ properties: assignees: $ref: 'assignees.yaml' category: - type: - - 'string' - - 'null' + type: string description: The case category. + nullable: true closed_at: - type: - - 'string' - - 'null' + type: string format: date-time + nullable: true closed_by: $ref: 'case_response_closed_by_properties.yaml' comments: @@ -74,8 +72,7 @@ properties: created_at: type: string format: date-time - examples: - - '2022-05-13T09:16:17.416Z' + example: '2022-05-13T09:16:17.416Z' created_by: $ref: 'case_response_created_by_properties.yaml' customFields: @@ -87,25 +84,21 @@ properties: $ref: 'case_customfields.yaml' description: type: string - examples: - - A case description. + example: A case description. duration: - type: - - 'integer' - - 'null' + type: integer description: > The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case was closed after less than half a second, the duration is rounded down to zero. - examples: - - 120 + nullable: true + example: 120 external_service: $ref: 'external_service.yaml' id: type: string - examples: - - 66b9aa00-94fa-11ea-9f74-e7e108796192 + example: 66b9aa00-94fa-11ea-9f74-e7e108796192 owner: $ref: 'owners.yaml' settings: @@ -118,28 +111,23 @@ properties: type: array items: type: string - examples: - - [tag-1] + example: + - tag-1 title: type: string - examples: - - Case title 1 + example: Case title 1 totalAlerts: type: integer - examples: - - 0 + example: 0 totalComment: type: integer - examples: - - 0 + example: 0 updated_at: - type: - - 'string' - - 'null' + type: string format: date-time + nullable: true updated_by: $ref: 'case_response_updated_by_properties.yaml' version: type: string - examples: - - WzUzMiwxXQ== + example: WzUzMiwxXQ== diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml index 72f2c3ef619a2..c59a5565c98b9 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml @@ -1,7 +1,6 @@ title: Case response properties for pushed_by -type: - - "object" - - "null" +type: object +nullable: true properties: $ref: 'user_properties.yaml' required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml index 8e475c5d205d6..cd1bae033f2ff 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml @@ -1,7 +1,6 @@ title: Case response properties for updated_by -type: - - "object" - - "null" +type: object +nullable: true properties: $ref: 'user_properties.yaml' required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml index 8484d4d051ca4..6879f820d6f5c 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml @@ -3,5 +3,4 @@ description: Indicates whether a case is automatically closed when it is pushed enum: - close-by-pushing - close-by-user -examples: - - close-by-user \ No newline at end of file +example: close-by-user \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml index 6a41e07aada44..9731b8ce4fad5 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml @@ -3,5 +3,4 @@ description: The type of comment. enum: - alert - user -examples: - - user \ No newline at end of file +example: user \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml index e68c226ee9b92..9416a31f38775 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml @@ -1,11 +1,7 @@ fields: - description: > - An object containing the connector fields. - To create a case without a connector, specify null. - If you want to omit any individual field, specify null as its value. - type: - - "object" - - "null" + description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. + nullable: true + type: object properties: caseId: description: The case identifier for Swimlane connectors. @@ -15,9 +11,8 @@ fields: type: string destIp: description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true impact: description: The effect an incident had on business for ServiceNow ITSM connectors. type: string @@ -31,14 +26,12 @@ fields: type: string malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task for Jira connectors. type: string @@ -53,26 +46,22 @@ fields: type: string sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true subcategory: description: The subcategory of the incident for ServiceNow ITSM connectors. type: string urgency: description: The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors. type: string - examples: - - null + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none type: $ref: 'connector_types.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml index b204dcbdd9f4d..871b3180bc22e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml @@ -8,11 +8,9 @@ description: Defines properties for connectors when type is `.cases-webhook`. type: object properties: fields: - type: - - "string" - - "null" - examples: - - null + type: string + nullable: true + example: null id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -22,7 +20,6 @@ properties: type: description: The type of connector. type: string - examples: - - .cases-webhook + example: .cases-webhook enum: - .cases-webhook \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml index 6eb1c0baa8e4e..a63f1fbd568d0 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml @@ -17,19 +17,16 @@ properties: properties: issueType: description: The type of issue. - type: - - "string" - - "null" + type: string + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task. - type: - - "string" - - "null" + type: string + nullable: true priority: description: The priority of the issue. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -39,7 +36,6 @@ properties: type: description: The type of connector. type: string - examples: - - .jira + example: .jira enum: - .jira diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml index 2497b1357c86c..c1bc49372f645 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml @@ -9,25 +9,20 @@ type: object properties: fields: description: An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null. - type: - - "string" - - "null" - examples: - - null + nullable: true + type: string + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. type: string - examples: - - none + example: none type: description: The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`. type: string - examples: - - .none + example: .none enum: - .none \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml index df8e34057de0e..bf7929b3060e3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml @@ -9,9 +9,8 @@ type: object properties: fields: description: An object containing the connector fields. If you want to omit any individual field, specify null as its value. - type: - - "object" - - "null" + type: object + nullable: true required: - issueTypes - severityCode @@ -33,7 +32,6 @@ properties: type: description: The type of connector. type: string - examples: - - .resilient + example: .resilient enum: - .resilient \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml index 7a57a9e69ccc2..5bc76ab7a9dd1 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml @@ -19,29 +19,24 @@ properties: properties: category: description: The category of the incident. - type: - - "string" - - "null" + type: string + nullable: true impact: description: The effect an incident had on business. - type: - - "string" - - "null" + type: string + nullable: true severity: description: The severity of the incident. - type: - - "string" - - "null" + type: string + nullable: true subcategory: description: The subcategory of the incident. - type: - - "string" - - "null" + type: string + nullable: true urgency: description: The extent to which the incident resolution can be delayed. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -51,7 +46,6 @@ properties: type: description: The type of connector. type: string - examples: - - .servicenow + example: .servicenow enum: - .servicenow \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml index cafff746d18f5..42245f9771e39 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml @@ -21,39 +21,32 @@ properties: properties: category: description: The category of the incident. - type: - - "string" - - "null" + type: string + nullable: true destIp: description: Indicates whether cases will send a comma-separated list of destination IPs. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs. - type: - - "boolean" - - "null" + type: boolean + nullable: true priority: description: The priority of the issue. - type: - - "string" - - "null" + type: string + nullable: true sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs. - type: - - "boolean" - - "null" + type: boolean + nullable: true subcategory: description: The subcategory of the incident. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -63,7 +56,6 @@ properties: type: description: The type of connector. type: string - examples: - - .servicenow-sir + example: .servicenow-sir enum: - .servicenow-sir \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml index 9cde6dd09d7c8..f4c138463078b 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml @@ -15,9 +15,8 @@ properties: properties: caseId: description: The case identifier for Swimlane connectors. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -27,7 +26,6 @@ properties: type: description: The type of connector. type: string - examples: - - .swimlane + example: .swimlane enum: - .swimlane \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml index 4bc12b3ae9481..fc23b9cab5f8a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml @@ -8,5 +8,4 @@ enum: - .servicenow - .servicenow-sir - .swimlane -examples: - - .none \ No newline at end of file +example: .none \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml index 411f977928a8c..b3b3182b8c964 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml @@ -1,6 +1,5 @@ -type: - - "object" - - "null" +type: object +nullable: true properties: connector_id: type: string @@ -16,8 +15,7 @@ properties: type: string format: date-time pushed_by: - type: - - "object" - - "null" + type: object properties: - $ref: 'user_properties.yaml' \ No newline at end of file + $ref: 'user_properties.yaml' + nullable: true \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml index fa265756d9506..9036fd5a3833a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml @@ -6,5 +6,4 @@ enum: - cases - observability - securitySolution -examples: - - cases \ No newline at end of file +example: cases \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml index eaaaa539a33ca..0b0d3fc3c07ce 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml @@ -6,16 +6,14 @@ properties: alertId: oneOf: - type: string - examples: - - 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d + example: 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d - type: array items: type: string index: oneOf: - type: string - examples: - - .alerts-observability.logs.alerts-default + example: .alerts-observability.logs.alerts-default - type: array items: type: string diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml index a5483b6412871..728614cd36692 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml @@ -20,7 +20,6 @@ properties: type: array items: type: string - examples: - - ["tag-1"] + example: ["tag-1"] title: type: string \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml index 29e16039ec273..933d91305dca7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml @@ -1,4 +1,3 @@ -type: - - "object" - - "null" -description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable. \ No newline at end of file +type: object +description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable. +nullable: true \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml index 8ea6902802514..bed767719e6f3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml @@ -4,5 +4,4 @@ properties: type: array items: type: string - examples: - - ["tag-1"] \ No newline at end of file + example: ["tag-1"] \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml index 0a4dfb828dcb5..09712b57ce138 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml @@ -10,10 +10,8 @@ properties: id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule \ No newline at end of file + example: security_rule \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml index 2ed5e0e89e8d7..64b93b77429a4 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml @@ -1,10 +1,8 @@ id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule \ No newline at end of file + example: security_rule \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml index 576b8b9dff157..a344eb0491951 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml @@ -6,5 +6,4 @@ properties: syncAlerts: description: Turns alert syncing on or off. type: boolean - examples: - - true \ No newline at end of file + example: true \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml index 5c5619cec298a..2c7bd5dcc1215 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml @@ -17,8 +17,7 @@ properties: description: > The identifier for the comment. To retrieve comment IDs, use the get comments API. - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 index: $ref: 'alert_indices.yaml' owner: @@ -30,12 +29,10 @@ properties: type: string enum: - alert - examples: - - alert + example: alert version: description: > The current comment version. To retrieve version values, use the get comments API. type: string - examples: - - Wzk1LDFd \ No newline at end of file + example: Wzk1LDFd \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml index e359eea8e1030..aa6329b7370de 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml @@ -36,5 +36,4 @@ properties: The version of the connector. To retrieve the version value, use the get configuration API. type: string - examples: - - WzIwMiwxXQ== + example: WzIwMiwxXQ== diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml index 003f12d63a30d..a83050e93eaaf 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml @@ -6,15 +6,13 @@ properties: description: The new comment. It is required only when `type` is `user`. type: string maxLength: 30000 - examples: - - A new comment. + example: A new comment. id: type: string description: > The identifier for the comment. To retrieve comment IDs, use the get comments API. - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 owner: $ref: 'owners.yaml' type: @@ -22,15 +20,13 @@ properties: description: The type of comment. enum: - user - examples: - - user + example: user version: description: > The current comment version. To retrieve version values, use the get comments API. type: string - examples: - - Wzk1LDFd + example: Wzk1LDFd required: - comment - id diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml index 12b45d987598b..a17f98d8007ad 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml @@ -13,16 +13,13 @@ properties: action: $ref: 'actions.yaml' comment_id: - type: - - "string" - - "null" - examples: - - 578608d0-03b1-11ed-920c-974bfa104448 + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 created_at: type: string format: date-time - examples: - - 2022-05-13T09:16:17.416Z + example: 2022-05-13T09:16:17.416Z created_by: type: object properties: @@ -33,8 +30,7 @@ properties: - username id: type: string - examples: - - 22fd3e30-03b1-11ed-920c-974bfa104448 + example: 22fd3e30-03b1-11ed-920c-974bfa104448 owner: $ref: 'owners.yaml' payload: @@ -54,8 +50,7 @@ properties: - $ref: 'payload_user_comment.yaml' version: type: string - examples: - - WzM1ODg4LDFd + example: WzM1ODg4LDFd type: type: string description: The type of action. @@ -71,5 +66,4 @@ properties: - status - settings - severity - examples: - - create_case + example: create_case diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml index 02521d975d8de..ef39c531c357d 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml @@ -14,23 +14,18 @@ properties: $ref: 'actions.yaml' action_id: type: string - examples: - - 22fd3e30-03b1-11ed-920c-974bfa104448 + example: 22fd3e30-03b1-11ed-920c-974bfa104448 case_id: type: string - examples: - - 22df07d0-03b1-11ed-920c-974bfa104448 + example: 22df07d0-03b1-11ed-920c-974bfa104448 comment_id: - type: - - "string" - - "null" - examples: - - 578608d0-03b1-11ed-920c-974bfa104448 + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 created_at: type: string format: date-time - examples: - - 2022-05-13T09:16:17.416Z + example: 2022-05-13T09:16:17.416Z created_by: type: object properties: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml index 832d603e366dc..b1727d3279abe 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml @@ -5,46 +5,37 @@ required: properties: comment: type: string - examples: - - A new comment. + example: A new comment. created_at: type: string format: date-time - examples: - - 2022-05-13T09:16:17.416Z + example: 2022-05-13T09:16:17.416Z created_by: $ref: 'case_response_created_by_properties.yaml' id: type: string - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 owner: $ref: 'owners.yaml' pushed_at: - type: - - "string" - - "null" + type: string format: date-time - examples: - - null + nullable: true + example: null pushed_by: $ref: 'case_response_pushed_by_properties.yaml' type: type: string - examples: - - user + example: user enum: - user updated_at: - type: - - "string" - - "null" + type: string format: date-time - examples: - - null + nullable: true + example: null updated_by: $ref: 'case_response_updated_by_properties.yaml' version: type: string - examples: - - WzIwNDMxLDFd \ No newline at end of file + example: WzIwNDMxLDFd \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml index 3c5439ac7aeee..19b76a6000c02 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml @@ -1,22 +1,15 @@ email: - type: - - "string" - - "null" - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - "string" - - "null" - examples: - - null -profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - "string" - - "null" - examples: - - elastic + type: string + example: elastic + nullable: true +profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 diff --git a/x-pack/plugins/cases/docs/openapi/entrypoint.yaml b/x-pack/plugins/cases/docs/openapi/entrypoint.yaml index dff3dff43622c..ebb649ee77462 100644 --- a/x-pack/plugins/cases/docs/openapi/entrypoint.yaml +++ b/x-pack/plugins/cases/docs/openapi/entrypoint.yaml @@ -1,8 +1,8 @@ -openapi: 3.1.0 +openapi: 3.0.1 info: title: Cases description: OpenAPI schema for Cases endpoints - version: '0.2' + version: '0.1' contact: name: Cases Team license: diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml index 7914c8a994c60..64ff49d17b8cd 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml @@ -28,7 +28,7 @@ get: title: type: string description: The case title. - examples: + example: - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 title: security_case '401': diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml index 8b52cf5d013cd..321f2f6938c50 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml @@ -14,9 +14,8 @@ post: content: application/json: schema: - type: - - "object" - - "null" + type: object + nullable: true responses: '200': description: Indicates a successful call. diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml index 0ffe229fd9e69..f1e287e05d304 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml @@ -28,7 +28,7 @@ get: title: type: string description: The case title. - examples: + example: - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 title: security_case '401': diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml index c06972c8dd0e8..bee91522dde29 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml @@ -18,9 +18,8 @@ post: content: application/json: schema: - type: - - "object" - - "null" + type: object + nullable: true responses: '200': description: Indicates a successful call. diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml index 9fda51fa59792..0b5a6e660da8b 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml @@ -11,6 +11,7 @@ get: - $ref: '../components/parameters/case_id.yaml' - $ref: '../components/parameters/space_id.yaml' - $ref: '../components/parameters/page_index.yaml' + example: "1" - $ref: '../components/parameters/page_size.yaml' - $ref: '../components/parameters/sort_order.yaml' - $ref: '../components/parameters/user_action_types.yaml'