Define various object to specify party, company, address and contact.
{
"$id": "https://www.igarment.net/schema/json/v1-0/object-party.json",
"title": "A business related association.",
"description": "Common schema used to define a business partner.",
"$defs": {
// Party include company information and contact information.
"party": {
"type": "object",
"properties": {
"company": { "$ref": "#/$defs/company" },
"contacts": {
"type": "array",
"items": { "$ref": "#/$defs/contact" },
},
},
"required": ["company"]
},
// Company object properties
"company": {
"type": "object",
"properties": {
"name": { "type": "string" },
"address": { "$ref": "#/$defs/address" },
"phone": { "type": "string" },
"fax": { "type": "string" },
"domain": { "type": "string" }
}
},
// Address object
"address": {
"type": "object",
"properties": {
"street": { "type": "string" },
"city": { "type": "string" },
"state": { "type": "string" },
"country": { "type": "string" },
"zipcode": { "type": "string" }
}
},
// A contact
"contact": {
"type": "object",
"properties": {
"name": { "type": "string" },
"email": { "type": "string", "format": "email" },
"irc_address": { "type": "string" }
},
"required": [ "name" ]
}
}
}