Skip to content

Commit

Permalink
Add conditional round_id regex pattern. Resolves #112
Browse files Browse the repository at this point in the history
  • Loading branch information
annakrystalli committed Dec 13, 2024
1 parent 39fb079 commit 24ea842
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions v4.0.1/tasks-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"round_id": {
"description": "Round identifier. If round_id_from_variable = true, round_id should be the name of a task id variable present in all sets of modeling task specifications",
"examples": [
"round-1",
"round_1",
"2022-11-05",
"origin_date"
],
Expand All @@ -36,7 +36,7 @@
"round_name": {
"description": "An optional round name. This can be useful for internal referencing of rounds, for examples, when a date is used as round_id but hub maintainers and teams also refer to rounds as round-1, round-2 etc.",
"examples": [
"round-1"
"round 1"
],
"type": "string"
},
Expand Down Expand Up @@ -1490,6 +1490,20 @@
}
}
},
"if": {
"properties": {
"round_id_from_variable": {
"const": "false"
}
}
},
"then": {
"properties": {
"round_id": {
"pattern": "^([0-9]{4}-[0-9]{2}-[0-9]{2})|[A-Za-z0-9_]+$"
}
}
},
"required": [
"round_id_from_variable",
"round_id",
Expand Down

0 comments on commit 24ea842

Please sign in to comment.