Skip to content

Commit

Permalink
fix: jsonschema to correctly validate key|keys in rollout segment (#2947
Browse files Browse the repository at this point in the history
)
  • Loading branch information
halcyonCorsair authored Apr 4, 2024
1 parent 2770a9d commit 70302a1
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions core/validation/flipt.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
"rolloutSegment": {
"type": "object",
"properties": {
"key": {
"type": "string",
"pattern": "^[-_,A-Za-z0-9]+$"
},
"keys": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"pattern": "^[-_,A-Za-z0-9]+$"
}
},
"operator": {
Expand All @@ -44,8 +49,29 @@
}
},
"required": [
"keys",
"value"
],
"oneOf": [
{
"required": [
"key"
],
"not": {
"required": [
"keys"
]
}
},
{
"required": [
"keys"
],
"not": {
"required": [
"key"
]
}
}
]
},
"rolloutThreshold": {
Expand Down

0 comments on commit 70302a1

Please sign in to comment.