initial
This commit is contained in:
32
code/schema.json
Normal file
32
code/schema.json
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user