Migrate output schema to V2 (#14311)
Previous refacto was creating output schema V2 which has more specific schemas based on the step type. Before we were using one common schema, which was too complex when searching for variable informations. This PR migrate the deprecated schemas and remove the old code: - mark previous `BaseOutputSchema` as deprecated - remove other previous schemas - use V2 everywhere - icon should not be stored in schema. Instead it should be generated based on the fieldmetadata or the item type
This commit is contained in:
+3
-1
@@ -6,13 +6,15 @@ const isManyToOneRelationField = (field: FieldMetadataEntity) =>
|
||||
(field as FieldMetadataEntity<FieldMetadataType.RELATION>).settings
|
||||
?.relationType === 'MANY_TO_ONE';
|
||||
|
||||
const EXCLUDED_SYSTEM_FIELDS = ['searchVector', 'position'];
|
||||
|
||||
// TODO refactor
|
||||
export const shouldGenerateFieldFakeValue = <T extends FieldMetadataType>(
|
||||
field: FieldMetadataEntity<T>,
|
||||
) => {
|
||||
return (
|
||||
field.isActive &&
|
||||
field.name !== 'searchVector' &&
|
||||
!(EXCLUDED_SYSTEM_FIELDS.includes(field.name) && field.isSystem) &&
|
||||
(field.type !== FieldMetadataType.RELATION ||
|
||||
isManyToOneRelationField(field as unknown as FieldMetadataEntity))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user