Logical Types

Logical Types

Logical types are used for semantic annotation and validation without changing the underlying storage type.

Supported Logical Types

Logical TypeYAML SyntaxDescriptionExample Values
Emaillogical_type: emailEmail address formatuser@example.com
URLlogical_type: urlWeb URLhttps://example.com
IP Addresslogical_type: ip_addressIP address192.168.1.1
Phonelogical_type: phonePhone number+886-2-1234-5678
Postal Codelogical_type: postal_codePostal code10045

Notes

  • Logical types are only used for validation and do not change storage format
  • Underlying data type is typically string
  • Can be used together with basic types to provide additional semantic information