diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts index caf19f80f040a..639bd56208546 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/api/connector/update_connector_name_and_description_api_logic.ts @@ -16,17 +16,15 @@ export type PutConnectorNameAndDescriptionArgs = Partial< indexName: string; }; -export type PutConnectorNameAndDescriptionResponse = Partial< - Pick -> & { +export type PutConnectorNameAndDescriptionResponse = Pick & { indexName: string; }; export const putConnectorNameAndDescription = async ({ connectorId, - description, + description = null, indexName, - name, + name = '', }: PutConnectorNameAndDescriptionArgs) => { const route = `/internal/enterprise_search/connectors/${connectorId}/name_and_description`; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description.tsx index d75482e25e784..9f6c96ce75e0a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/connector/connector_name_and_description/connector_name_and_description.tsx @@ -65,7 +65,7 @@ export const ConnectorNameAndDescription: React.FC = () => { title: NAME_LABEL, }, { - description: description ?? '--', + description: description || '--', title: DESCRIPTION_LABEL, }, ]} diff --git a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts index 0aaf30ef126d4..9663b216ec91c 100644 --- a/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts +++ b/x-pack/plugins/enterprise_search/server/routes/enterprise_search/connectors.ts @@ -254,8 +254,8 @@ export function registerConnectorRoutes({ router, log }: RouteDependencies) { connectorId: schema.string(), }), body: schema.object({ - name: schema.maybe(schema.string()), - description: schema.maybe(schema.string()), + name: schema.string(), + description: schema.nullable(schema.string()), }), }, },