Generates JSON schemas for struct-backed event types and read models.
This is the single source of truth for schema generation shared by event type
registration (Chronicle.EventTypes) and read model registration
(Chronicle.Registration.Coordinator). Generating both through one path keeps
property typing consistent and ensures compliance (PII) metadata is always
embedded the same way.
Fields marked with Chronicle.Compliance.pii/1,2 are emitted with a
compliance array on their property schema, which the Chronicle kernel reads
to apply compliance-aware encryption.
Summary
Functions
Generates a JSON schema string for a struct module.
Functions
Generates a JSON schema string for a struct module.
Options
:key_transform— how struct field names are rendered as schema property names.:camelrenderssnake_caseascamelCase(used for event types, whose content is serialized as camelCase);:identitykeeps the field name as-is (used for read models, whose stored properties are snake_case). Defaults to:identity.
PII fields are discovered through the module's __chronicle_pii__/0 accessor
when present.