diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index c3fef89e021dd..b36a745179833 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -4579,6 +4579,54 @@ ], "default": "low" }, + "custom_fields_property": { + "type": "array", + "description": "Values for custom fields of a case", + "minItems": 0, + "maxItems": 5, + "items": { + "type": "object", + "required": [ + "key", + "type", + "field" + ], + "properties": { + "key": { + "description": "The key identifying the custom field.", + "type": "string" + }, + "type": { + "description": "The type of the custom field. Should match the key and how the custom field was configured", + "type": "string" + }, + "field": { + "description": "An object containing the value of the field.", + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "description": "The value of the field.", + "nullable": true, + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "boolean" + } + ] + } + } + } + } + } + } + }, "create_case_request": { "title": "Create case request", "description": "The create case API request body varies depending on the type of connector.", @@ -4652,6 +4700,9 @@ "description": "A title for the case.", "type": "string", "maxLength": 160 + }, + "customFields": { + "$ref": "#/components/schemas/custom_fields_property" } } }, @@ -5296,6 +5347,9 @@ "version": { "description": "The current version of the case. To determine this value, use the get case or find cases APIs.", "type": "string" + }, + "customFields": { + "$ref": "#/components/schemas/custom_fields_property" } } } diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index f818d279a2e27..ddee756120e01 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -2890,6 +2890,38 @@ components: - low - medium default: low + custom_fields_property: + type: array + description: Values for custom fields of a case + minItems: 0 + maxItems: 5 + items: + type: object + required: + - key + - type + - field + properties: + key: + description: The key identifying the custom field. + type: string + type: + description: The type of the custom field. Should match the key and how the custom field was configured + type: string + field: + description: An object containing the value of the field. + type: object + required: + - value + properties: + value: + description: The value of the field. + nullable: true + type: array + items: + anyOf: + - type: string + - type: boolean create_case_request: title: Create case request description: The create case API request body varies depending on the type of connector. @@ -2938,6 +2970,8 @@ components: description: A title for the case. type: string maxLength: 160 + customFields: + $ref: '#/components/schemas/custom_fields_property' case_response_closed_by_properties: title: Case response properties for closed_by type: object @@ -3403,6 +3437,8 @@ components: version: description: The current version of the case. To determine this value, use the get case or find cases APIs. type: string + customFields: + $ref: '#/components/schemas/custom_fields_property' searchFieldsType: type: string description: The fields to perform the `simple_query_string` parsed query against. diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml index 1092975985dd0..7b3d8d8219ff7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/create_case_request.yaml @@ -3,12 +3,12 @@ description: >- The create case API request body varies depending on the type of connector. type: object required: - - connector - - description - - owner - - settings - - tags - - title + - connector + - description + - owner + - settings + - tags + - title properties: assignees: $ref: 'assignees.yaml' @@ -45,4 +45,6 @@ properties: title: description: A title for the case. type: string - maxLength: 160 \ No newline at end of file + maxLength: 160 + customFields: + $ref: 'custom_fields_property.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml new file mode 100644 index 0000000000000..2b682960bd1f0 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/custom_fields_property.yaml @@ -0,0 +1,31 @@ +type: array +description: Values for custom fields of a case +minItems: 0 +maxItems: 5 +items: + type: object + required: + - key + - type + - field + properties: + key: + description: The key identifying the custom field. + type: string + type: + description: The type of the custom field. Should match the key and how the custom field was configured + type: string + field: + description: An object containing the value of the field. + type: object + required: + - value + properties: + value: + description: The value of the field. + nullable: true + type: array + items: + anyOf: + - type: string + - type: boolean diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml index df3e7ab17d674..4bbac95630e47 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_request.yaml @@ -58,3 +58,5 @@ properties: version: description: The current version of the case. To determine this value, use the get case or find cases APIs. type: string + customFields: + $ref: 'custom_fields_property.yaml'