Configuration
Adapters
Prisma, Drizzle, and SQL source adapters and every source field.
Each schema source is declared with an adapter helper. All adapters return an OzzyRMSchemaSource and need a unique id.
| Adapter | Import | Typical include |
|---|---|---|
| Prisma | prisma() | ./prisma or ./prisma/schema.prisma |
| Drizzle | drizzle() | ./src/db/schema.ts (entry file) |
| SQL | sql() | ./db/schema.sql or a folder of .sql files |
Source fields
Shared options on every adapter:
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | Unique. Used in the sidebar and in unified.sources / scenarios.schemaId |
include | string[] | yes | Files or directories relative to project cwd |
label | string | no | Human label in the UI |
file | string | no | Display name. Defaults: schema.prisma, schema.ts, schema.sql |
version | string | no | Semver-like label shown as v1.0.0. Default 1.0.0 |
extension | string | no | Optional file extension hint for loaders |
disabled | object | no | Turn off enums, referencedBy, or descriptions in the docs |
metadata | object | no | Optional model/field description overlays |
prisma({
id: "app-prisma",
include: ["./prisma"],
label: "Application schema",
file: "schema.prisma",
version: "1.2.0",
disabled: {
descriptions: false,
},
metadata: {
models: {
User: { description: "Authenticated account." },
},
fields: {
User: {
email: { description: "Login identity." },
},
},
},
})Prisma
import { defineProject, prisma } from "ozzyrm";
export default defineProject({
schemas: [
prisma({
id: "app-prisma",
include: ["./prisma"], // directory or schema.prisma path
}),
],
});Prisma schemas are loaded through Prisma internals. Datasource URLs are not persisted into the docs catalog.
Drizzle
drizzle({
id: "app-drizzle",
include: ["./src/db/schema.ts"],
})Drizzle is parsed from TypeScript as text (AST). The adapter does not execute your schema module.
SQL
sql({
id: "legacy-sql",
include: ["./db/schema.sql"],
// or: include: ["./migrations"],
})SQL adapters accept a single .sql file or a folder of DDL files.
Validation tips
- Every source
idmust be unique and non-empty (INVALID_SOURCE_ID). includemust not be empty (EMPTY_INCLUDE).- With default security,
includeandoutputmust stay under the project cwd. See Security.