Skip to content

Commit

Permalink
Updating schemas to hopefully stop AI returning an invalid date
Browse files Browse the repository at this point in the history
  • Loading branch information
davetaz committed Jun 13, 2024
1 parent 1de8d69 commit 55a356e
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "care.theodi.org",
"version": "2.6.1",
"version": "2.6.2",
"description": "The ODI Care tool (AI enabled)",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion public/data/schemas/partials/actionPlanning.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
},
"date": {
"type": "string",
"title": "Date"
"title": "Date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date in the format YYYY-MM-DD"
},
"stakeholder": {
"type": "string",
Expand Down
5 changes: 3 additions & 2 deletions public/data/schemas/partials/completeAssessment.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@
},
"date": {
"type": "string",
"format": "date",
"title": "Date"
"title": "Date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date in the format YYYY-MM-DD"
},
"stakeholder": {
"type": "string",
Expand Down
4 changes: 3 additions & 1 deletion public/data/schemas/partials/riskEvaluation.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
},
"date": {
"type": "string",
"title": "Date"
"title": "Date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date in the format YYYY-MM-DD"
},
"stakeholder": {
"type": "string",
Expand Down
4 changes: 3 additions & 1 deletion public/data/schemas/partials/unintendedConsequences.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
},
"date": {
"type": "string",
"title": "Date"
"title": "Date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date in the format YYYY-MM-DD"
},
"stakeholder": {
"type": "string",
Expand Down
4 changes: 3 additions & 1 deletion public/data/schemas/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
},
"date": {
"type": "string",
"title": "Date"
"title": "Date",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Date in the format YYYY-MM-DD"
},
"stakeholder": {
"type": "string",
Expand Down

0 comments on commit 55a356e

Please sign in to comment.