chore: update example that's created

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2025-06-04 11:18:00 +02:00
parent 89a941dad8
commit d6d63c7cfe
2 changed files with 11 additions and 12 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Updating the scaffolder action boilerplate to use new `zod` schema
@@ -12,22 +12,16 @@ import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
export function createExampleAction() {
// For more information on how to define custom actions, see
// https://backstage.io/docs/features/software-templates/writing-custom-actions
return createTemplateAction<{
myParameter: string;
}>({
return createTemplateAction({
id: 'acme:example',
description: 'Runs an example action',
schema: {
input: {
type: 'object',
required: ['myParameter'],
properties: {
myParameter: {
title: 'An example parameter',
description: "This is an example parameter, don't set it to foo",
type: 'string',
},
},
myParameter: z =>
z.string({
description:
"This is an example parameter, don't set it to foo",
}),
},
},
async handler(ctx) {