Skip to content

Commit 5ac2df5

Browse files
committed
update(schemas): relax environment id requirement in service upgraded
Some CD tools (e.g. Spinnaker) have no concept of environment, forcing producers to set id to a placeholder like "n/a". This change adds a tier field with x-suggested-values (prod, nonprod, unknown) and relaxes the constraint to require at least one of id or tier, so tools without a meaningful environment id can use tier instead. Signed-off-by: xibz <bjp@apple.com>
1 parent 73ae696 commit 5ac2df5

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

schemas/serviceupgraded.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@
7070
"type": "string",
7171
"minLength": 1
7272
},
73+
"tier": {
74+
"type": "string",
75+
"minLength": 1,
76+
"x-suggested-values": ["prod", "nonprod", "unknown"]
77+
},
7378
"source": {
7479
"type": "string",
7580
"minLength": 1,
@@ -78,8 +83,9 @@
7883
},
7984
"additionalProperties": false,
8085
"type": "object",
81-
"required": [
82-
"id"
86+
"anyOf": [
87+
{"required": ["id"]},
88+
{"required": ["tier"]}
8389
]
8490
},
8591
"artifactId": {

0 commit comments

Comments
 (0)