From 22f600acad57939230dc470f57c2a1a9c1ba9604 Mon Sep 17 00:00:00 2001 From: Ben Meier <1651305+astromechza@users.noreply.github.com> Date: Thu, 12 Sep 2024 08:33:40 +0100 Subject: [PATCH] feat: allow dot as separator in resource id (#105) Signed-off-by: Ben Meier --- samples/score-full.yaml | 2 +- score-v1b1.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/score-full.yaml b/samples/score-full.yaml index 8b51d2b..55df5c7 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/score-v1b1.json b/score-v1b1.json index 3b609fd..94d8364 100644 --- a/score-v1b1.json +++ b/score-v1b1.json @@ -144,11 +144,11 @@ "pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,61}[A-Za-z0-9]$" }, "id": { - "description": "An optional external Resource identifier. When two resources share the same type, class, and id, they are considered the same resource when used across related Workloads. The id must be a valid RFC1123 Label Name of up to 63 characters, including a-z, 0-9, '-' but may not start or end with '-'.", + "description": "An optional Resource identifier. The id may be up to 63 characters, including one or more labels of a-z, 0-9, '-' not starting or ending with '-' separated by '.'. When two resources share the same type, class, and id, they are considered the same resource when used across related Workloads.", "type": "string", "minLength": 2, "maxLength": 63, - "pattern": "^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$" + "pattern": "^[a-z0-9]+(?:-+[a-z0-9]+)*(?:\\.[a-z0-9]+(?:-+[a-z0-9]+)*)*$" }, "metadata": { "description": "The metadata for the Resource.",