diff --git a/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.test.tsx b/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.test.tsx index 704a7d2243..dff5500b51 100644 --- a/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.test.tsx +++ b/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.test.tsx @@ -368,13 +368,11 @@ describe('useTemplateSchema', () => { expect(first.schema).toEqual({ dependencies: firstStepDependencies, properties: expect.anything(), - title: undefined, type: 'object', }); expect(second.schema).toEqual({ dependencies: secondStepDependencies, - title: undefined, }); }); }); diff --git a/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.ts b/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.ts index af004910be..380d87d7ad 100644 --- a/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.ts +++ b/plugins/scaffolder-react/src/next/hooks/useTemplateSchema.ts @@ -60,12 +60,13 @@ export const useTemplateSchema = ( }) // Then filter out the properties that are not enabled with feature flag .map(step => { + // Title is rendered at the top of the page, so let's ignore this from jsonschemaform + const { title, ...stepSchema } = step.schema; + const strippedSchema = { ...step, schema: { - ...step.schema, - // Title is rendered at the top of the page, so let's ignore this from jsonschemaform - title: undefined, + ...stepSchema, }, } as ParsedTemplateSchema;