Skip to main content
Voltaire’s Effect schemas support full annotations that improve developer experience across error messages, JSON Schema generation, and form validation.

Why Annotate Schemas?

Annotation Types

Benefits

Better Error Messages

Without annotations, parse errors show raw type information:
With message annotation:

JSON Schema Generation

Generate OpenAPI-compatible schemas with JSONSchema.make():

Form Integration

Use title and description for form labels and help text:

IDE Autocomplete

Annotations surface in IDE hover information, making types self-documenting.

Annotation Patterns by Type

Address Types

Hash Types

Numeric Types

Sensitive Types

Accessing Annotations

Custom Error Formatting

Use TreeFormatter with annotated schemas:

See Also