Skip to content

Commit 0727bde

Browse files
committed
Removed duplicate validation hooks in Workflow deserialization
Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
1 parent e02cf4b commit 0727bde

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/lib/generated/classes/workflow.ts

-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ export class Workflow extends ObjectHydrator<Specification.Workflow> {
9494

9595
static deserialize(text: string): WorkflowIntersection {
9696
const model = yaml.load(text) as Partial<Specification.Workflow>;
97-
getLifecycleHooks('Workflow')?.preValidation?.(model);
9897
validate('Workflow', model);
99-
getLifecycleHooks('Workflow')?.postValidation?.(model);
10098
return new Workflow(model) as WorkflowIntersection;
10199
}
102100

tools/4_generate-classes.ts

-2
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ export class ${name} extends ${baseClass ? '_' + baseClass : `ObjectHydrator<Spe
108108
? `
109109
static deserialize(text: string): WorkflowIntersection {
110110
const model = yaml.load(text) as Partial<Specification.Workflow>;
111-
getLifecycleHooks('Workflow')?.preValidation?.(model);
112111
validate('Workflow', model);
113-
getLifecycleHooks('Workflow')?.postValidation?.(model);
114112
return new Workflow(model) as WorkflowIntersection;
115113
}
116114

0 commit comments

Comments
 (0)