adt.config.json

adt.config.json defines the FileMaker layouts, generated schema format, client naming, and output paths for one Web Viewer app. It is stored in that app's directory under webviewer-apps/<app>/.

adt.config.json

The config file has two top-level keys:

Key Type Description
config object or array of objects One config object per FileMaker connection/layout set. See below. Can be an array if you need different settings for different sets of layouts.
postGenerateCommand string (optional) A shell command to run once after all files are generated — for example "pnpm biome format --write ." or "npx prettier --write src/".
Copy
{
  "config": {
    "type": "fmdapi",
    "path": "./src/config/schemas/filemaker",
    "clearOldFiles": true,
    "clientSuffix": "Layout",
    "validator": "zod/v4",
    "webviewerScriptName": "ADT_execute_data_api",
    "layouts": []
  }
}

This is the config the project template ships with, before you've added any layouts.

Config object fields

Field Type Default Description
type "fmdapi" "fmdapi" Identifies this as a Data API config. Added automatically if you omit it.
layouts array [] The layouts to generate schemas and clients for. See Layout options below.
path string "schema" The folder, relative to the app directory containing adt.config.json, where generated files are written.
clearOldFiles boolean false If true, empties the client and generated subdirectories before writing new files — useful for clearing out layouts you've since removed from the config. The app template sets this to true.
validator "zod" | "zod/v4" | "zod/v3" | false "zod/v4" The validator to generate schemas with. Set to false to generate TypeScript types only, with no runtime validation.
clientSuffix string "Layout" Suffix appended to schemaName to form the generated client's export name — a schemaName of "Contacts" becomes ContactsLayout.
generateClient boolean true If false, only the schema/types are generated, not the client files. Useful when hand-writing your own client but keeping field names in sync. Can be overridden per layout.
webviewerScriptName string "ADT_execute_data_api" The FileMaker script the generated client calls through WebViewerAdapter. Override this only when your file's connect script uses a different name.
fileName string (optional) — The connected FileMaker file's name. If omitted, typegen asks the bridge which file is connected; if exactly one is connected, it fills this in and writes it back into your config file automatically. If more than one file is connected, you must set this explicitly.
configName string (optional) — A label for this config entry, useful for your own reference when you have more than one config object in the array.

Layout options

Each entry in layouts describes one FileMaker layout to generate a schema and client for.

Field Type Default Description
layoutName string (required) — The exact name of the layout in your FileMaker file.
schemaName string (required) — A valid TypeScript identifier used as the base name for the generated types, schema, and client.
valueLists "strict" | "allowEmpty" | "ignore" "ignore" How to type fields that have a value list attached. "ignore" types them as plain string. "strict" types them as a union of the value list's values. "allowEmpty" does the same but also allows "", since FileMaker allows a field to be blank even with a value list attached.
generateClient boolean inherits the top-level generateClient Overrides the top-level generateClient setting for this one layout.
strictNumbers boolean false If true, number fields are typed as number | null instead of string | number. The default also permits strings because FileMaker may return large numbers in scientific notation.
Copy
{
  "config": {
    "layouts": [
      { "layoutName": "Contacts", "schemaName": "Contacts" },
      { "layoutName": "Orders", "schemaName": "Orders", "valueLists": "strict" }
    ]
  }
}

Even when valueLists is "ignore", the value list's values are still exported from the generated schema file for you to use elsewhere in your code — they just aren't enforced on the field itself.

Multiple configs

config can be an array instead of a single object — useful if part of your app needs a different path, validator, or set of layouts than the rest:

Copy
{
  "config": [
    { "type": "fmdapi", "path": "./src/config/schemas/filemaker", "layouts": [/* ... */] },
    { "type": "fmdapi", "path": "./src/config/schemas/reports", "validator": false, "layouts": [/* ... */] }
  ]
}