OzzyRMOzzyRMDocs
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.

AdapterImportTypical include
Prismaprisma()./prisma or ./prisma/schema.prisma
Drizzledrizzle()./src/db/schema.ts (entry file)
SQLsql()./db/schema.sql or a folder of .sql files

Source fields

Shared options on every adapter:

FieldTypeRequiredNotes
idstringyesUnique. Used in the sidebar and in unified.sources / scenarios.schemaId
includestring[]yesFiles or directories relative to project cwd
labelstringnoHuman label in the UI
filestringnoDisplay name. Defaults: schema.prisma, schema.ts, schema.sql
versionstringnoSemver-like label shown as v1.0.0. Default 1.0.0
extensionstringnoOptional file extension hint for loaders
disabledobjectnoTurn off enums, referencedBy, or descriptions in the docs
metadataobjectnoOptional model/field description overlays
TypeScript
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

TypeScript
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

TypeScript
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

TypeScript
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 id must be unique and non-empty (INVALID_SOURCE_ID).
  • include must not be empty (EMPTY_INCLUDE).
  • With default security, include and output must stay under the project cwd. See Security.

Next

On this page