Skip to content

Commit

Permalink
Tweak notableDonations schema
Browse files Browse the repository at this point in the history
  • Loading branch information
zoton2 committed Feb 19, 2024
1 parent 4a01a5f commit 469492c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 10 additions & 4 deletions schemas/notableDonations.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"$comment": "Some of this schema is actually wrong, and was modified due to another application sending incorrect data!",
"items": {
"type": "object",
"additionalProperties": false,
Expand All @@ -21,7 +22,14 @@
"type": "string"
},
"comment": {
"type": "string"
"oneOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"time_received": {
"type": "string"
Expand All @@ -32,9 +40,7 @@
"_id",
"donor_visiblename",
"amount",
"comment_state",
"comment",
"time_received"
"comment"
]
},
"default": []
Expand Down
6 changes: 3 additions & 3 deletions src/types/schemas/notableDonations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type NotableDonations = {
_id: number;
donor_visiblename: string;
amount: number;
comment_state: string;
comment: string;
time_received: string;
comment_state?: string;
comment: string | null;
time_received?: string;
}[];

0 comments on commit 469492c

Please sign in to comment.