Skip to content

Commit a23ab3c

Browse files
committed
Add the Playlist.v0alpha1 resource
1 parent 775cf20 commit a23ab3c

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/grafana/cog/main/schemas/veneers.json
2+
3+
language: all
4+
5+
package: playlistv0alpha1
6+
7+
builders:
8+
- promote_options_to_constructor:
9+
by_name: Playlist
10+
options: [title]
11+
12+
options:
13+
# Append a single `item` instead of a list of everything
14+
- duplicate:
15+
by_name: Playlist.items
16+
as: item
17+
- array_to_append:
18+
by_name: Playlist.item
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/grafana/cog/main/schemas/unit.json
2+
3+
inputs:
4+
- cue:
5+
url: 'https://raw.githubusercontent.com/grafana/grafana/v12.3.2/apps/playlist/kinds/playlist.cue'
6+
7+
# Name of the package in which code for this resource will be generated.
8+
package: playlistv0alpha1
9+
10+
# The actual schema for a playlist isn't at the root of the file, so we
11+
# have to tell cog where to find it.
12+
subpath: playlistv0alpha1.schema.spec
13+
14+
# The playlist schema is defined under the `spec` name, which cog will use
15+
# unless told otherwise. Playlist is a better name here.
16+
forced_envelope: Playlist
17+
18+
builder_transformations:
19+
- '%__config_dir%/common.builder.transforms.yaml'

0 commit comments

Comments
 (0)