makes statements work.

This commit is contained in:
2024-06-07 10:51:38 -07:00
parent 6ea21f7d87
commit 6b3d076e12
4 changed files with 65 additions and 56 deletions

View File

@@ -1,32 +1,39 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Invoice Data Schema",
"title": "Invoice schema",
"description": "A schema to validate invoice data",
"type": "array",
"items": {
"type": "object",
"properties": {
"customer_identifier": {
"description": "The customer's name. e.g., ABC Corporation, Microsoft, etc.",
"type": "string"
"properties": {
"customer_identifier": {
"description": "The customer's name. e.g., ABC Corporation, Microsoft, etc.",
"type": "string"
},
"vendor_identifier": {
"description": "The vendor's name",
"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. Not always present on 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})?$"
}
},
"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
"required": ["customer_identifier", "vendor_identifier", "date", "invoice_number", "total"],
"additionalProperties": false
}
}