Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-scaffolder-backend-module-amplication': patch
---

Add a scaffolder example for the `amplication:scaffold-service` action so it appears in installed actions and users can see sample input usage.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2025 The Backstage Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { TemplateExample } from '@backstage/plugin-scaffolder-node';
import yaml from 'yaml';

export const examples: TemplateExample[] = [
{
description: 'Scaffold a new service using Amplication',
example: yaml.stringify({
steps: [
{
id: 'amplication-scaffold-service',
action: 'amplication:scaffold-service',
name: 'Scaffold Service (Amplication)',
input: {
name: 'fooService',
description: 'Service created by Backstage',
project_id: '1a2b3c4d5e6f7g8h9i0j',
serviceTemplate_id: '9i8h7g6f5e4d3c2b1a0',
workspace_id: 'f1e2d3c4b5a6978685d4',
},
},
],
}),
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
import { Config } from '@backstage/config';
import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
import { examples } from './amplication.examples';
/**
* Creates an action that creates an application in MTA.
*/
Expand All @@ -28,6 +29,7 @@ export function scaffoldResourceFromAmplicationTemplate({
return createTemplateAction({
id: 'amplication:scaffold-service',
description: 'Scaffold a new service from a template (using Amplication)',
examples,
schema: {
input: {
name: z => z.string({ description: 'The name of the service' }),
Expand Down
Loading