This commit is contained in:
2024-05-30 21:13:47 -07:00
commit 6ea21f7d87
8 changed files with 848 additions and 0 deletions

32
code/schema.json Normal file
View File

@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Invoice Data Schema",
"description": "A schema to validate invoice data",
"type": "object",
"properties": {
"customer_identifier": {
"description": "The customer's name. e.g., ABC Corporation, Microsoft, etc.",
"type": "string"
},
"date": {
"description": "Invoice date in ISO 8601 format (YYYY-MM-DD).",
"type": "string",
"format": "date"
},
"invoice_number": {
"description": "Unique invoice number for the transaction.",
"type": "string"
},
"account_number": {
"description": "Customer's account number associated with the invoice.",
"type": "string"
},
"total": {
"description": "Total amount of the invoice, including taxes and fees. It should be a decimal number as a string.",
"type": "string",
"pattern": "^\\d+(\\.\\d{1,2})?$"
}
},
"required": ["customer_identifier", "date", "invoice_number", "account_number", "total"],
"additionalProperties": false
}