Function: createSchemaRegistry()
createSchemaRegistry(
options?):SchemaRegistry
Defined in: src/Mnemonic/schema-registry.ts:41
Create an immutable schema registry for common default/strict-mode setups.
The helper indexes schemas and migrations up front, validates duplicate and
ambiguous definitions, and returns a SchemaRegistry ready to pass to
MnemonicProvider.
Most applications should prefer this helper over manually implementing SchemaRegistry.
See the Schema Migration guide for end-to-end registry and migration patterns.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | CreateSchemaRegistryOptions | Initial schema and migration definitions |
Returns
An indexed immutable schema registry
Throws
With SCHEMA_REGISTRATION_CONFLICT for duplicate
schemas, or MIGRATION_GRAPH_INVALID for invalid migration graphs