diff --git a/.changeset/warm-pigs-speak.md b/.changeset/warm-pigs-speak.md new file mode 100644 index 0000000000..32f8e0ca14 --- /dev/null +++ b/.changeset/warm-pigs-speak.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Added a default type when is not defined in the schema to prevent id collision diff --git a/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts b/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts index 7de3994a8e..0e1c0a4b50 100644 --- a/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts +++ b/plugins/scaffolder/src/components/MultistepJsonForm/schema.ts @@ -63,6 +63,7 @@ function extractUiSchema(schema: JsonObject, uiSchema: JsonObject) { export function transformSchemaToProps( inputSchema: JsonObject, ): { schema: FormProps['schema']; uiSchema: FormProps['uiSchema'] } { + inputSchema.type = inputSchema.type || 'object'; const schema = JSON.parse(JSON.stringify(inputSchema)); delete schema.title; // Rendered separately const uiSchema = {};