From 1569fc3fa3947d5b7ac735e7db3cf11300de374f Mon Sep 17 00:00:00 2001 From: Ben Meier Date: Wed, 11 Sep 2024 22:00:36 +0100 Subject: [PATCH] fix: prevent labels ending with - in resource id Signed-off-by: Ben Meier --- score-v1b1.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/score-v1b1.json b/score-v1b1.json index 3f0c389..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 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 may be up to 63 characters, including a-z, 0-9, '-' or '.' but may not start or end with '-' or '.'.", + "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.",