Skip to content

Commit

Permalink
schema: accommodate imprecise dates in the date field, supporting YYY…
Browse files Browse the repository at this point in the history
…Y and YYYY-MM as well (#260)
  • Loading branch information
avivace committed Dec 24, 2024
1 parent 1e417f8 commit 3dd6683
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions schemas/game-schema-d4.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,17 @@
"format": "uri"
},
"date": {
"type": "string",
"format": "date",
"description": "The date the entry was first released"
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}(-(0?[1-9]|1[0-2])(-(0?[1-9]|[12][0-9]|3[01]))?)?$"
},
{
"type": "string",
"format": "date"
}
],
"description": "The date the entry was first released, expressed in ISO8601 format. To accommodate imprecise dates, the formats YYYY-MM (year and month) and YYYY (year only) are also supported"
},
"tags": {
"type": "array",
Expand Down

0 comments on commit 3dd6683

Please sign in to comment.