mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-29 17:49:14 +00:00
fix(ui): the tags issue with same column name in entities (#11921)
* fix the tags issue with same column name in entities * fix unit test
This commit is contained in:
parent
75d9826911
commit
8d3a8e0a37
@ -106,7 +106,7 @@ const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
|||||||
|
|
||||||
updateContainerColumnTags(
|
updateContainerColumnTags(
|
||||||
containerDataModel?.columns,
|
containerDataModel?.columns,
|
||||||
editColumnTag.name,
|
editColumnTag.fullyQualifiedName ?? '',
|
||||||
newSelectedTags
|
newSelectedTags
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -123,7 +123,7 @@ const ContainerDataModel: FC<ContainerDataModelProps> = ({
|
|||||||
const containerDataModel = cloneDeep(dataModel);
|
const containerDataModel = cloneDeep(dataModel);
|
||||||
updateContainerColumnDescription(
|
updateContainerColumnDescription(
|
||||||
containerDataModel?.columns,
|
containerDataModel?.columns,
|
||||||
editContainerColumnDescription?.name,
|
editContainerColumnDescription.fullyQualifiedName ?? '',
|
||||||
updatedDescription
|
updatedDescription
|
||||||
);
|
);
|
||||||
await onUpdate(containerDataModel);
|
await onUpdate(containerDataModel);
|
||||||
|
|||||||
@ -99,7 +99,7 @@ const ModelTab = ({
|
|||||||
|
|
||||||
updateDataModelColumnTags(
|
updateDataModelColumnTags(
|
||||||
dataModelData,
|
dataModelData,
|
||||||
editColumnTag.name,
|
editColumnTag.fullyQualifiedName ?? '',
|
||||||
newSelectedTags
|
newSelectedTags
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ const ModelTab = ({
|
|||||||
const dataModelColumns = cloneDeep(data);
|
const dataModelColumns = cloneDeep(data);
|
||||||
updateDataModelColumnDescription(
|
updateDataModelColumnDescription(
|
||||||
dataModelColumns,
|
dataModelColumns,
|
||||||
editColumnDescription?.name,
|
editColumnDescription?.fullyQualifiedName ?? '',
|
||||||
updatedDescription
|
updatedDescription
|
||||||
);
|
);
|
||||||
await onUpdate(dataModelColumns);
|
await onUpdate(dataModelColumns);
|
||||||
|
|||||||
@ -200,16 +200,16 @@ const EntityTable = ({
|
|||||||
|
|
||||||
const updateColumnTags = (
|
const updateColumnTags = (
|
||||||
tableCols: Column[],
|
tableCols: Column[],
|
||||||
changedColName: string,
|
changedColFQN: string,
|
||||||
newColumnTags: Array<TagOption>
|
newColumnTags: Array<TagOption>
|
||||||
) => {
|
) => {
|
||||||
tableCols?.forEach((col) => {
|
tableCols?.forEach((col) => {
|
||||||
if (col.name === changedColName) {
|
if (col.fullyQualifiedName === changedColFQN) {
|
||||||
col.tags = getUpdatedTags(col, newColumnTags);
|
col.tags = getUpdatedTags(col, newColumnTags);
|
||||||
} else {
|
} else {
|
||||||
updateColumnTags(
|
updateColumnTags(
|
||||||
col?.children as Column[],
|
col?.children as Column[],
|
||||||
changedColName,
|
changedColFQN,
|
||||||
newColumnTags
|
newColumnTags
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -242,7 +242,11 @@ const EntityTable = ({
|
|||||||
);
|
);
|
||||||
if (newSelectedTags && editColumnTag) {
|
if (newSelectedTags && editColumnTag) {
|
||||||
const tableCols = cloneDeep(tableColumns);
|
const tableCols = cloneDeep(tableColumns);
|
||||||
updateColumnTags(tableCols, editColumnTag.name, newSelectedTags);
|
updateColumnTags(
|
||||||
|
tableCols,
|
||||||
|
editColumnTag.fullyQualifiedName ?? '',
|
||||||
|
newSelectedTags
|
||||||
|
);
|
||||||
await onUpdate(tableCols);
|
await onUpdate(tableCols);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -121,7 +121,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
|||||||
const schema = cloneDeep(messageSchema);
|
const schema = cloneDeep(messageSchema);
|
||||||
updateFieldTags(
|
updateFieldTags(
|
||||||
schema?.schemaFields,
|
schema?.schemaFields,
|
||||||
editColumnTag.name,
|
editColumnTag.fullyQualifiedName ?? '',
|
||||||
newSelectedTags
|
newSelectedTags
|
||||||
);
|
);
|
||||||
await onUpdate(schema);
|
await onUpdate(schema);
|
||||||
@ -133,7 +133,7 @@ const TopicSchemaFields: FC<TopicSchemaFieldsProps> = ({
|
|||||||
const schema = cloneDeep(messageSchema);
|
const schema = cloneDeep(messageSchema);
|
||||||
updateFieldDescription(
|
updateFieldDescription(
|
||||||
schema?.schemaFields,
|
schema?.schemaFields,
|
||||||
editFieldDescription.name,
|
editFieldDescription.fullyQualifiedName ?? '',
|
||||||
updatedDescription
|
updatedDescription
|
||||||
);
|
);
|
||||||
await onUpdate(schema);
|
await onUpdate(schema);
|
||||||
|
|||||||
@ -53,11 +53,13 @@ const nestedColumn = {
|
|||||||
name: 'order_id',
|
name: 'order_id',
|
||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'api_client_id',
|
description: 'api_client_id',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -78,11 +80,13 @@ const updatedNestedColumn: Column = {
|
|||||||
name: 'order_id',
|
name: 'order_id',
|
||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'updated description',
|
description: 'updated description',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -105,12 +109,14 @@ const nestedColumnWithTags = {
|
|||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
tags: [],
|
tags: [],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'api_client_id',
|
description: 'api_client_id',
|
||||||
tags: [],
|
tags: [],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -126,12 +132,14 @@ const updatedNestedColumnWithTags: Column = {
|
|||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
tags: mockTags as Column['tags'],
|
tags: mockTags as Column['tags'],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataType.Int,
|
dataType: DataType.Int,
|
||||||
description: 'api_client_id',
|
description: 'api_client_id',
|
||||||
tags: [],
|
tags: [],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -158,14 +166,14 @@ describe('getContainerDetailPath', () => {
|
|||||||
// updated the single column
|
// updated the single column
|
||||||
updateContainerColumnDescription(
|
updateContainerColumnDescription(
|
||||||
containerColumns,
|
containerColumns,
|
||||||
'id',
|
'sample_kafka.customer_events.id',
|
||||||
'updated description'
|
'updated description'
|
||||||
);
|
);
|
||||||
|
|
||||||
// updated the nested column
|
// updated the nested column
|
||||||
updateContainerColumnDescription(
|
updateContainerColumnDescription(
|
||||||
containerColumns,
|
containerColumns,
|
||||||
'api_client_id',
|
'sample_kafka.customer_events.Order.api_client_id',
|
||||||
'updated description'
|
'updated description'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -180,7 +188,11 @@ describe('getContainerDetailPath', () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// updated the single column
|
// updated the single column
|
||||||
updateContainerColumnTags(containerColumns, 'id', mockTagOptions);
|
updateContainerColumnTags(
|
||||||
|
containerColumns,
|
||||||
|
'sample_kafka.customer_events.id',
|
||||||
|
mockTagOptions
|
||||||
|
);
|
||||||
|
|
||||||
const updatedContainerColumns = [
|
const updatedContainerColumns = [
|
||||||
{ ...updatedSingleColumn, tags: mockTags },
|
{ ...updatedSingleColumn, tags: mockTags },
|
||||||
@ -193,7 +205,11 @@ describe('getContainerDetailPath', () => {
|
|||||||
const containerColumns = [nestedColumnWithTags];
|
const containerColumns = [nestedColumnWithTags];
|
||||||
|
|
||||||
// updated the single column
|
// updated the single column
|
||||||
updateContainerColumnTags(containerColumns, 'order_id', mockTagOptions);
|
updateContainerColumnTags(
|
||||||
|
containerColumns,
|
||||||
|
'sample_kafka.customer_events.Order.order_id',
|
||||||
|
mockTagOptions
|
||||||
|
);
|
||||||
|
|
||||||
const updatedContainerColumns = [updatedNestedColumnWithTags];
|
const updatedContainerColumns = [updatedNestedColumnWithTags];
|
||||||
|
|
||||||
|
|||||||
@ -64,11 +64,11 @@ const getUpdatedContainerColumnTags = (
|
|||||||
|
|
||||||
export const updateContainerColumnTags = (
|
export const updateContainerColumnTags = (
|
||||||
containerColumns: ContainerDataModel['columns'] = [],
|
containerColumns: ContainerDataModel['columns'] = [],
|
||||||
changedColumnName: string,
|
changedColumnFQN: string,
|
||||||
newColumnTags: TagOption[] = []
|
newColumnTags: TagOption[] = []
|
||||||
) => {
|
) => {
|
||||||
containerColumns.forEach((containerColumn) => {
|
containerColumns.forEach((containerColumn) => {
|
||||||
if (containerColumn.name === changedColumnName) {
|
if (containerColumn.fullyQualifiedName === changedColumnFQN) {
|
||||||
containerColumn.tags = getUpdatedContainerColumnTags(
|
containerColumn.tags = getUpdatedContainerColumnTags(
|
||||||
containerColumn,
|
containerColumn,
|
||||||
newColumnTags
|
newColumnTags
|
||||||
@ -80,7 +80,7 @@ export const updateContainerColumnTags = (
|
|||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
updateContainerColumnTags(
|
updateContainerColumnTags(
|
||||||
containerColumn.children,
|
containerColumn.children,
|
||||||
changedColumnName,
|
changedColumnFQN,
|
||||||
newColumnTags
|
newColumnTags
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -90,11 +90,11 @@ export const updateContainerColumnTags = (
|
|||||||
|
|
||||||
export const updateContainerColumnDescription = (
|
export const updateContainerColumnDescription = (
|
||||||
containerColumns: ContainerDataModel['columns'] = [],
|
containerColumns: ContainerDataModel['columns'] = [],
|
||||||
changedColumnName: string,
|
changedColumnFQN: string,
|
||||||
description: string
|
description: string
|
||||||
) => {
|
) => {
|
||||||
containerColumns.forEach((containerColumn) => {
|
containerColumns.forEach((containerColumn) => {
|
||||||
if (containerColumn.name === changedColumnName) {
|
if (containerColumn.fullyQualifiedName === changedColumnFQN) {
|
||||||
containerColumn.description = description;
|
containerColumn.description = description;
|
||||||
} else {
|
} else {
|
||||||
const hasChildren = !isEmpty(containerColumn.children);
|
const hasChildren = !isEmpty(containerColumn.children);
|
||||||
@ -103,7 +103,7 @@ export const updateContainerColumnDescription = (
|
|||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
updateContainerColumnDescription(
|
updateContainerColumnDescription(
|
||||||
containerColumn.children,
|
containerColumn.children,
|
||||||
changedColumnName,
|
changedColumnFQN,
|
||||||
description
|
description
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,11 +37,11 @@ export const getDataModelsDetailPath = (dataModelFQN: string, tab?: string) => {
|
|||||||
|
|
||||||
export const updateDataModelColumnDescription = (
|
export const updateDataModelColumnDescription = (
|
||||||
containerColumns: Column[] = [],
|
containerColumns: Column[] = [],
|
||||||
changedColumnName: string,
|
changedColumnFQN: string,
|
||||||
description: string
|
description: string
|
||||||
) => {
|
) => {
|
||||||
containerColumns.forEach((containerColumn) => {
|
containerColumns.forEach((containerColumn) => {
|
||||||
if (containerColumn.name === changedColumnName) {
|
if (containerColumn.fullyQualifiedName === changedColumnFQN) {
|
||||||
containerColumn.description = description;
|
containerColumn.description = description;
|
||||||
} else {
|
} else {
|
||||||
const hasChildren = !isEmpty(containerColumn.children);
|
const hasChildren = !isEmpty(containerColumn.children);
|
||||||
@ -50,7 +50,7 @@ export const updateDataModelColumnDescription = (
|
|||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
updateDataModelColumnDescription(
|
updateDataModelColumnDescription(
|
||||||
containerColumn.children,
|
containerColumn.children,
|
||||||
changedColumnName,
|
changedColumnFQN,
|
||||||
description
|
description
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -91,11 +91,11 @@ const getUpdatedDataModelColumnTags = (
|
|||||||
|
|
||||||
export const updateDataModelColumnTags = (
|
export const updateDataModelColumnTags = (
|
||||||
containerColumns: Column[] = [],
|
containerColumns: Column[] = [],
|
||||||
changedColumnName: string,
|
changedColumnFQN: string,
|
||||||
newColumnTags: TagOption[] = []
|
newColumnTags: TagOption[] = []
|
||||||
) => {
|
) => {
|
||||||
containerColumns.forEach((containerColumn) => {
|
containerColumns.forEach((containerColumn) => {
|
||||||
if (containerColumn.name === changedColumnName) {
|
if (containerColumn.fullyQualifiedName === changedColumnFQN) {
|
||||||
containerColumn.tags = getUpdatedDataModelColumnTags(
|
containerColumn.tags = getUpdatedDataModelColumnTags(
|
||||||
containerColumn,
|
containerColumn,
|
||||||
newColumnTags
|
newColumnTags
|
||||||
@ -107,7 +107,7 @@ export const updateDataModelColumnTags = (
|
|||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
updateDataModelColumnTags(
|
updateDataModelColumnTags(
|
||||||
containerColumn.children,
|
containerColumn.children,
|
||||||
changedColumnName,
|
changedColumnFQN,
|
||||||
newColumnTags
|
newColumnTags
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,18 +18,18 @@ import { LabelType, State, TagLabel } from '../generated/type/tagLabel';
|
|||||||
|
|
||||||
export const updateFieldDescription = (
|
export const updateFieldDescription = (
|
||||||
schemaFields: Field[] = [],
|
schemaFields: Field[] = [],
|
||||||
changedFieldName: string,
|
changedFieldFQN: string,
|
||||||
description: string
|
description: string
|
||||||
) => {
|
) => {
|
||||||
schemaFields.forEach((field) => {
|
schemaFields.forEach((field) => {
|
||||||
if (field.name === changedFieldName) {
|
if (field.fullyQualifiedName === changedFieldFQN) {
|
||||||
field.description = description;
|
field.description = description;
|
||||||
} else {
|
} else {
|
||||||
const hasChildren = !isEmpty(field.children);
|
const hasChildren = !isEmpty(field.children);
|
||||||
|
|
||||||
// stop condition
|
// stop condition
|
||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
updateFieldDescription(field.children, changedFieldName, description);
|
updateFieldDescription(field.children, changedFieldFQN, description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -65,18 +65,18 @@ const getUpdatedFieldTags = (field: Field, newFieldTags: TagOption[] = []) => {
|
|||||||
|
|
||||||
export const updateFieldTags = (
|
export const updateFieldTags = (
|
||||||
schemaFields: Field[] = [],
|
schemaFields: Field[] = [],
|
||||||
changedFieldName: string,
|
changedFieldFQN: string,
|
||||||
newFieldTags: TagOption[] = []
|
newFieldTags: TagOption[] = []
|
||||||
) => {
|
) => {
|
||||||
schemaFields.forEach((field) => {
|
schemaFields.forEach((field) => {
|
||||||
if (field.name === changedFieldName) {
|
if (field.fullyQualifiedName === changedFieldFQN) {
|
||||||
field.tags = getUpdatedFieldTags(field, newFieldTags);
|
field.tags = getUpdatedFieldTags(field, newFieldTags);
|
||||||
} else {
|
} else {
|
||||||
const hasChildren = !isEmpty(field.children);
|
const hasChildren = !isEmpty(field.children);
|
||||||
|
|
||||||
// stop condition
|
// stop condition
|
||||||
if (hasChildren) {
|
if (hasChildren) {
|
||||||
updateFieldTags(field.children, changedFieldName, newFieldTags);
|
updateFieldTags(field.children, changedFieldFQN, newFieldTags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -49,11 +49,13 @@ const nestedField = {
|
|||||||
name: 'order_id',
|
name: 'order_id',
|
||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'api_client_id',
|
description: 'api_client_id',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -74,11 +76,13 @@ const updatedNestedField: Field = {
|
|||||||
name: 'order_id',
|
name: 'order_id',
|
||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'updated description',
|
description: 'updated description',
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -101,12 +105,14 @@ const nestedFieldWithTags = {
|
|||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
tags: [],
|
tags: [],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'api_client_id',
|
description: 'api_client_id',
|
||||||
tags: [],
|
tags: [],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -122,12 +128,14 @@ const updatedNestedFieldWithTags: Field = {
|
|||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'order_id',
|
description: 'order_id',
|
||||||
tags: mockTags as Field['tags'],
|
tags: mockTags as Field['tags'],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.order_id',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'api_client_id',
|
name: 'api_client_id',
|
||||||
dataType: DataTypeTopic.Int,
|
dataType: DataTypeTopic.Int,
|
||||||
description: 'api_client_id',
|
description: 'api_client_id',
|
||||||
tags: [],
|
tags: [],
|
||||||
|
fullyQualifiedName: 'sample_kafka.customer_events.Order.api_client_id',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -137,12 +145,16 @@ describe('Topic schema field utils', () => {
|
|||||||
const schemaFields = [singleField, nestedField];
|
const schemaFields = [singleField, nestedField];
|
||||||
|
|
||||||
// updated the single field
|
// updated the single field
|
||||||
updateFieldDescription(schemaFields, 'id', 'updated description');
|
updateFieldDescription(
|
||||||
|
schemaFields,
|
||||||
|
'sample_kafka.customer_events.id',
|
||||||
|
'updated description'
|
||||||
|
);
|
||||||
|
|
||||||
// updated the nested field
|
// updated the nested field
|
||||||
updateFieldDescription(
|
updateFieldDescription(
|
||||||
schemaFields,
|
schemaFields,
|
||||||
'api_client_id',
|
'sample_kafka.customer_events.Order.api_client_id',
|
||||||
'updated description'
|
'updated description'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -157,7 +169,11 @@ describe('Topic schema field utils', () => {
|
|||||||
];
|
];
|
||||||
|
|
||||||
// updated the single field
|
// updated the single field
|
||||||
updateFieldTags(schemaFields, 'id', mockTagOptions);
|
updateFieldTags(
|
||||||
|
schemaFields,
|
||||||
|
'sample_kafka.customer_events.id',
|
||||||
|
mockTagOptions
|
||||||
|
);
|
||||||
|
|
||||||
const updatedSchemaFields = [{ ...updatedSingleField, tags: mockTags }];
|
const updatedSchemaFields = [{ ...updatedSingleField, tags: mockTags }];
|
||||||
|
|
||||||
@ -168,7 +184,11 @@ describe('Topic schema field utils', () => {
|
|||||||
const schemaFields = [nestedFieldWithTags];
|
const schemaFields = [nestedFieldWithTags];
|
||||||
|
|
||||||
// updated the single field
|
// updated the single field
|
||||||
updateFieldTags(schemaFields, 'order_id', mockTagOptions);
|
updateFieldTags(
|
||||||
|
schemaFields,
|
||||||
|
'sample_kafka.customer_events.Order.order_id',
|
||||||
|
mockTagOptions
|
||||||
|
);
|
||||||
|
|
||||||
const updatedSchemaFields = [updatedNestedFieldWithTags];
|
const updatedSchemaFields = [updatedNestedFieldWithTags];
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user