Skip to content

Commit 0208181

Browse files
committed
schema: allow the "type" property for composable images
1 parent 91d87ed commit 0208181

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

validator/schema/upsun.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@
712712
"description": "A list of packages from the Upsun collection of supported runtimes and/or from NixPkgs. \nMore information: \nhttps://docs.upsun.com/create-apps/app-reference/composable-image.html"
713713
}
714714
},
715-
"oneOf": [
715+
"anyOf": [
716716
{
717717
"required": [
718718
"type"
@@ -722,6 +722,12 @@
722722
"required": [
723723
"stack"
724724
]
725+
},
726+
{
727+
"required": [
728+
"type",
729+
"stack"
730+
]
725731
}
726732
],
727733
"additionalProperties": false

validator/validator_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ services:
171171
Data: []byte(`
172172
applications:
173173
app1:
174-
type: "python:3.11"
174+
type: "composable:25.05"
175175
stack:
176176
177177
extensions:
@@ -195,7 +195,7 @@ services:
195195
},
196196
},
197197
},
198-
wantErr: true,
198+
wantErr: false,
199199
},
200200
{
201201
name: "true-boolean",

0 commit comments

Comments
 (0)