---
title: Metadata Loader
description: Metadata Loader protocol schemas
---

{/* ⚠️  AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}

<Callout type="info">
**Source:** `packages/spec/src/system/metadata-loader.zod.ts`
</Callout>

## TypeScript Usage

```typescript
import { MetadataFallbackStrategy, MetadataManagerConfig } from '@objectstack/spec/system';
import type { MetadataFallbackStrategy, MetadataManagerConfig } from '@objectstack/spec/system';

// Validate data
const result = MetadataFallbackStrategy.parse(data);
```

---

## MetadataFallbackStrategy

### Allowed Values

* `filesystem`
* `memory`
* `none`


---

## MetadataManagerConfig

### Properties

| Property | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| **datasource** | `string` | optional | Datasource name reference for database persistence |
| **tableName** | `string` | ✅ | Database table name for metadata storage |
| **fallback** | `Enum<'filesystem' \| 'memory' \| 'none'>` | ✅ | Fallback strategy when datasource is unavailable |
| **rootDir** | `string` | optional | Root directory path |
| **formats** | `Enum<'json' \| 'yaml' \| 'typescript' \| 'javascript'>[]` | ✅ | Enabled formats |
| **cache** | `Object` | optional | Cache settings |
| **watch** | `boolean` | ✅ | Enable file watching |
| **watchOptions** | `Object` | optional | File watcher options |
| **validation** | `Object` | optional | Validation settings |
| **loaderOptions** | `Record<string, any>` | optional | Loader-specific configuration |
| **persistence** | `Object` | optional | Persistence write gates |


---

