mirror of
https://github.com/zap-proto/spec.git
synced 2026-10-30 15:04:03 +00:00
- Add native .zap schema files (zap.zap, addressbook.zap) - Refactor Python bindings to zap_schema module - Add zapc schema compiler binary - Update Rust client/server/crypto/identity modules - Add release workflow and build scripts - Update TypeScript package configuration - Add LLM documentation for AI assistants
33 lines
617 B
Plaintext
33 lines
617 B
Plaintext
# ZAP Schema - Address Book Example
|
|
# Demonstrates the clean whitespace-significant syntax
|
|
|
|
struct Person
|
|
name Text
|
|
email Text
|
|
birthdate Date
|
|
phones List(PhoneNumber)
|
|
|
|
struct PhoneNumber
|
|
number Text
|
|
type Type
|
|
|
|
enum Type
|
|
mobile
|
|
home
|
|
work
|
|
|
|
struct Date
|
|
year Int16
|
|
month UInt8
|
|
day UInt8
|
|
|
|
struct AddressBook
|
|
people List(Person)
|
|
|
|
interface AddressService
|
|
addPerson (person Person) -> (id Text)
|
|
getPerson (id Text) -> (person Person)
|
|
listPeople () -> (people List(Person))
|
|
searchByName (query Text) -> (results List(Person))
|
|
deletePerson (id Text) -> (success Bool)
|