schemes:person:contactdetails
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
contactdetails
descripton
Das Schema für person:contactdetails enthält folgende Eigenschaften:
- E-Mail-Adresse: Das Hauptkontaktmittel (erforderlich).
- Telefonnummern: Eine Liste mit Details zu verschiedenen Telefonnummern, einschließlich Typ (z. B. Mobil, Arbeit).
- Social-Media-Handles: Optionale Plattformen und Benutzernamen.
examples
json notation
{
"emails": [
{
"type": "work",
"address": "example@work.com"
},
{
"type": "personal",
"address": "example@personal.com"
}
],
"phoneNumbers": [
{
"type": "mobile",
"countryCode": "+49",
"areaCode": "30",
"number": "123456789"
},
{
"type": "home",
"countryCode": "+1",
"areaCode": "212",
"number": "5551234",
"extension": "56"
}
],
"socialMedia": [
{
"platform": "Twitter",
"handle": "@example_user"
},
{
"platform": "LinkedIn",
"handle": "example-user"
}
]
}
array noatation
$person['contactDetails']['emails'][0]['type'] = "work"; $person['contactDetails']['emails'][0]['address'] = "example@work.com"; $person['contactDetails']['emails'][1]['type'] = "personal"; $person['contactDetails']['emails'][1]['address'] = "example@personal.com"; $person['contactDetails']['phoneNumbers'][0]['type'] = "mobile"; $person['contactDetails']['phoneNumbers'][0]['countryCode'] = "+49"; $person['contactDetails']['phoneNumbers'][0]['areaCode'] = "30"; $person['contactDetails']['phoneNumbers'][0]['number'] = "123456789"; $person['contactDetails']['phoneNumbers'][1]['type'] = "home"; $person['contactDetails']['phoneNumbers'][1]['countryCode'] = "+1"; $person['contactDetails']['phoneNumbers'][1]['areaCode'] = "212"; $person['contactDetails']['phoneNumbers'][1]['number'] = "5551234"; $person['contactDetails']['phoneNumbers'][1]['extension'] = "56"; $person['contactDetails']['socialMedia'][0]['platform'] = "Twitter"; $person['contactDetails']['socialMedia'][0]['handle'] = "@example_user"; $person['contactDetails']['socialMedia'][1]['platform'] = "LinkedIn"; $person['contactDetails']['socialMedia'][1]['handle'] = "example-user";
schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://b2base.eu/doku.php?id=schemes:person:contactdetails",
"title": "b2base:schemes:person:contactdetails",
"description": "A schema for representing a person's contact details.",
"type": "object",
"properties": {
"emails": {
"type": "array",
"description": "A list of the person's email addresses with optional types.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of email address, e.g., work, personal.",
"example": "work"
},
"address": {
"type": "string",
"format": "email",
"description": "The email address.",
"example": "example@work.com"
}
},
"required": ["address"]
},
"example": [
{"type": "work", "address": "example@work.com"},
{"type": "personal", "address": "example@personal.com"}
]
},
"phoneNumbers": {
"type": "array",
"description": "A list of the person's phone numbers.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of phone number, e.g., mobile, home, work.",
"example": "mobile"
},
"countryCode": {
"type": "string",
"description": "The international country code.",
"example": "+49"
},
"areaCode": {
"type": "string",
"description": "The regional or area code.",
"example": "30"
},
"number": {
"type": "string",
"description": "The local phone number.",
"example": "123456789"
},
"extension": {
"type": "string",
"description": "Optional phone extension.",
"example": "123"
}
},
"required": ["type", "countryCode", "areaCode", "number"]
},
"example": [
{"type": "mobile", "countryCode": "+49", "areaCode": "30", "number": "123456789"},
{"type": "home", "countryCode": "+1", "areaCode": "212", "number": "5551234", "extension": "56"}
]
},
"socialMedia": {
"type": "array",
"description": "A list of the person's social media handles.",
"items": {
"type": "object",
"properties": {
"platform": {
"type": "string",
"description": "The name of the social media platform.",
"example": "Twitter"
},
"handle": {
"type": "string",
"description": "The person's username or handle on the platform.",
"example": "@example_user"
}
},
"required": ["platform", "handle"]
},
"example": [
{"platform": "Twitter", "handle": "@example_user"},
{"platform": "LinkedIn", "handle": "example-user"}
]
}
},
"required": ["emails"]
}
schemes/person/contactdetails.1734013122.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
