Skip to content

Commit b15c410

Browse files
authored
feat(schema.json): update required extension section of porter manifest schema (#979)
Signed-off-by: Vaughn Dice <vadice@microsoft.com>
1 parent 7f81b1a commit b15c410

File tree

3 files changed

+42
-8
lines changed

3 files changed

+42
-8
lines changed

pkg/cnab/extensions/schema/io-cnab-docker.schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "object",
44
"properties": {
55
"privileged": {
6-
"description": "Option to set the --priviliged flag when running the Docker container",
6+
"description": "Option to set the --privileged flag when running the Docker container",
77
"type": "boolean"
88
}
99
},

pkg/porter/testdata/schema.json

+21-4
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,28 @@
420420
"type": "array"
421421
},
422422
"required": {
423+
"additionalItems": true,
423424
"description": "Required extensions for this bundle",
424-
"items": {
425-
"anyOf": []
426-
},
427-
"type": "array"
425+
"items": [
426+
{
427+
"properties": {
428+
"docker": {
429+
"$schema": "http://json-schema.org/draft-07/schema#",
430+
"additionalProperties": false,
431+
"properties": {
432+
"privileged": {
433+
"description": "Option to set the --privileged flag when running the Docker container",
434+
"type": "boolean"
435+
}
436+
},
437+
"type": "object"
438+
}
439+
},
440+
"type": "object"
441+
}
442+
],
443+
"type": "array",
444+
"uniqueItems": true
428445
},
429446
"tag": {
430447
"description": "The tag to use when the bundle is published to an OCI registry",

pkg/templates/templates/schema.json

+20-3
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,26 @@
236236
"required": {
237237
"description": "Required extensions for this bundle",
238238
"type": "array",
239-
"items": {
240-
"anyOf": []
241-
}
239+
"items": [
240+
{
241+
"type": "object",
242+
"properties": {
243+
"docker": {
244+
"$schema": "http://json-schema.org/draft-07/schema#",
245+
"type": "object",
246+
"properties": {
247+
"privileged": {
248+
"description": "Option to set the --privileged flag when running the Docker container",
249+
"type": "boolean"
250+
}
251+
},
252+
"additionalProperties": false
253+
}
254+
}
255+
}
256+
],
257+
"uniqueItems": true,
258+
"additionalItems": true
242259
},
243260
"uninstall": {
244261
"type": "array",

0 commit comments

Comments
 (0)