diff --git a/samples/score-full.yaml b/samples/score-full.yaml index 55df5c7..8b51d2b 100644 --- a/samples/score-full.yaml +++ b/samples/score-full.yaml @@ -70,6 +70,6 @@ resources: data: here resource-two2: type: Resource-Two - resource.three: + resource-three: type: Type-Three id: shared-type-three diff --git a/samples/score-minimal.yaml b/samples/score-minimal.yaml new file mode 100644 index 0000000..edecce3 --- /dev/null +++ b/samples/score-minimal.yaml @@ -0,0 +1,3 @@ +apiVersion: score.dev/v1b1 +metadata: + name: example-workload-name123 diff --git a/samples/score-with-extensions.yaml b/samples/score-with-extensions.yaml new file mode 100644 index 0000000..5226c1a --- /dev/null +++ b/samples/score-with-extensions.yaml @@ -0,0 +1,10 @@ +apiVersion: score.dev/v1b1 +metadata: + name: example-workload-name123 +x-my-extension: + archive: http://example.com/binary.tgz + variables: + SOME_VAR: ${resources.example.thing} +resources: + example: + type: resource-type diff --git a/score-v1b1.json b/score-v1b1.json index 4de147a..f7a06ea 100644 --- a/score-v1b1.json +++ b/score-v1b1.json @@ -6,10 +6,16 @@ "type": "object", "required": [ "apiVersion", - "metadata", - "containers" + "metadata" ], "additionalProperties": false, + "patternProperties": { + "^x-.+": { + "description": "A top-level Score extention. This is a schema extension which is not defined by the common Score specification but may be supported by a subset of Score implementations. The 'x-' prefix avoid conflict with future top level fields in the Score specification.", + "type": "object", + "additionalProperties": true + } + }, "properties": { "apiVersion": { "description": "The declared Score Specification version.", @@ -67,7 +73,7 @@ "containers": { "description": "The set of named containers in the Workload. The container name must be a valid RFC1123 Label Name of up to 63 characters, including a-z, 0-9, '-' but may not start or end with '-'.", "type": "object", - "minProperties": 0, + "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/container" },