Skip to content

Instantly share code, notes, and snippets.

@brandonbryant12
Created February 10, 2025 14:29
Show Gist options
  • Save brandonbryant12/cc57c1e828015d0c166938dbdfb55fd9 to your computer and use it in GitHub Desktop.
Save brandonbryant12/cc57c1e828015d0c166938dbdfb55fd9 to your computer and use it in GitHub Desktop.
/**
* Copyright ...
* (License header)
*/
export const defaultPreviewTemplate = `# Edit the template parameters below to see how they will render in the scaffolder form UI
parameters:
- title: Fill in some steps
ui:ObjectFieldTemplate: TwoColumn
required:
- name
properties:
name:
title: Name
type: string
description: Unique name of the component
owner:
title: Owner
type: string
description: Owner of the component
ui:field: OwnerPicker
ui:options:
catalogFilter:
kind: Group
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- github.com
- title: Custom Fields
required:
- lowerCaseValue
properties:
lowerCaseValue:
title: Lower Cased Value
type: string
ui:field: LowerCaseValuePicker
- title: Metadata Timestamps
description: These values come from your entity's metadata annotations. If the annotation does not exist, the field will be empty.
properties:
createdAt:
title: Created At
type: string
ui:readonly: true
default: "{{ annotations['created-at'] }}"
updatedAt:
title: Updated At
type: string
ui:readonly: true
default: "{{ annotations['updated-at'] }}"
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment