33 lines
1.2 KiB
JSON
33 lines
1.2 KiB
JSON
{
|
|
"$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
|
|
}
|