Schema for Governess Identifiable Information

From IdentifiableInformation.schema.yaml (governess/IdentifiableInformation.schema)

---
$id: https://skeleton.botmd.io/governess/IdentifiableInformation.schema
$schema: http://json-schema.org/draft-07/schema#

title: Identifiable Information
description: A simple data structure to store identifiable information.

type: object
additionalProperties: false

oneOf:
  - required: [type, value]
  - required: [phone]
  - required: [email]
  - required: [whatsapp]
  - required: [governess_user_uid]
  - required: [hospital_profile_uid]

properties:
  type:
    title: Type
    description: The identifiable information type.
    enum: [phone, email, whatsapp, governess_user_uid, hospital_profile_uid]

  value:
    title: Value
    description: The identifiable information value.
    type: string
    minLength: 1

  phone:
    title: Phone
    description: Phone number in E.164 format.
    type: string
    pattern: '^\+\d{5,}$'

  email:
    title: Email
    description: Email address.
    type: string
    anyOf:
      - format: email
      - format: idn-email

  whatsapp:
    title: WhatsApp
    description: WhatsApp phone number in E.164 format.
    type: string
    pattern: '^\+\d{5,}$'

  governess_user_uid:
    title: Governess User UID
    description: UID of Governess user.
    type: string
    pattern: "^[a-zA-Z0-9]{16,}$"

  hospital_profile_uid:
    title: Hospital Profile UID
    description: UID of Hospital profile.
    type: string
    pattern: "^[a-zA-Z0-9]{16,}$"
#end properties

[Main Page] [Schema Documentation] [Examples]