From d2c577b696dcb5326ae377f41546eab1a25f7914 Mon Sep 17 00:00:00 2001 From: John Kasper Svergja Date: Thu, 18 Jan 2024 10:32:09 +0100 Subject: [PATCH] Add description and requirements for maxLength and patterns Co-authored-by: nomx3 --- src/partials/v1/team-info-metadata.schema.json | 3 ++- src/v1/kuben-team-definition.schema.json | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/partials/v1/team-info-metadata.schema.json b/src/partials/v1/team-info-metadata.schema.json index 4ab2d1c..9bbf492 100644 --- a/src/partials/v1/team-info-metadata.schema.json +++ b/src/partials/v1/team-info-metadata.schema.json @@ -15,7 +15,8 @@ "team_name": { "description": "The (uniform) name of this team", "type": "string", - "minLength": 1 + "minLength": 1, + "maxLength": 16 }, "name": { "description": "Name of this resource", diff --git a/src/v1/kuben-team-definition.schema.json b/src/v1/kuben-team-definition.schema.json index 7863989..f7e5a33 100644 --- a/src/v1/kuben-team-definition.schema.json +++ b/src/v1/kuben-team-definition.schema.json @@ -8,7 +8,8 @@ "properties": { "uniform_name": { "type": "string", - "pattern": "^[a-z-]*$" + "pattern": "^[a-z-]*$", + "maxLength": 16 }, "display_name": { "type": "string", @@ -82,9 +83,10 @@ }, "repos": { "type": "array", - "description": "Which repositories the team atlantis will monitor", + "description": "Which repositories under Statistics Norway-organisation this team atlantis instance will monitor.", "items": { - "type": "string" + "type": "string", + "pattern": "^[a-zA-Z-_.0-9]*$" } } } @@ -102,7 +104,11 @@ }, "repos": { "type": "array", - "description": "A list of github repos that should be able to push to artifact registry" + "description": "A list of github repositories under Statistics Norway-organisation that is allowed to push to Artifact Registry repositories of the team.", + "items": { + "type": "string", + "pattern": "^[a-zA-Z-_.0-9]*$" + } } } }