Repository for generating the public Formaloo API reference from OpenAPI specifications across multiple services.
Install the pinned tooling:
npm ciGenerate the public spec, validation reports, and HTML docs:
./generate.shYou can still run the full build in Docker:
docker compose up --buildGenerated outputs:
openapi-v3.0.yaml: canonical public OpenAPI artifactopenapi-v3.0.mcp.yaml: MCP-focused OpenAPI artifacthtml/: generated static docs bundleartifacts/validation/: validation and lint reportsartifacts/release/: packaged release assets
Optional generation metadata:
spec/operation-metadata.json: optional sidecar manifest for public-safe operation metadata. The pipeline succeeds when this file is absent.spec/tag-metadata.json: public-facing tag naming and description overrides for generated docs navigation.
Serve the generated docs locally:
cd html && python3 -m http.server 8000Use STAGING_DOCS=true to generate documentation from staging endpoints:
STAGING_DOCS=true ./generate.sh- Production (default): Uses
api.formaloo.meand related production endpoints - Staging: Uses
api.staging.formaloo.comand related staging endpoints
Documentation consists of automated OpenAPI specs from services, a public normalization step, and manual descriptions added in this repository.
This repository uses both dev and master in the documentation release flow:
devis the staging documentation branch.masteris the production documentation branch.- Changes may be merged between
devandmasteras part of promotion or backfill work.
Target dev first for new documentation or generated-spec improvements unless the change is explicitly production-only. Check both branches before repeating work, because staging may contain changes that are not yet in production.
The MCP artifact (openapi-v3.0.mcp.yaml) is built from the formz service contract fetched with ?version=mcp-1.0, merged with the other services (which stay on ?version=3.0). Endpoint description Markdown files are shared with the public build and keep resolving from spec/docs/v3.0/; scripts/fetch-specs.mjs rewrites any docs/mcp-1.0/ references in the fetched mcp-1.0 contract to docs/v3.0/, so no separate Markdown set exists for MCP. The public artifact (openapi-v3.0.yaml) continues to use the formz ?version=3.0 contract.
While the upstream mcp-1.0 contract is being rolled out, scripts/backfill-mcp-operations.mjs copies validator-required operations that are missing from the mcp-1.0 merge (for example formsRetrieve, formsPartialUpdate, fieldsPartialUpdate) from the formz v3.0 bundle and logs each backfilled operation. The step is a no-op once the upstream contract exposes them; remove the script when the rollout is complete.
The MCP artifact should stay accurate for direct API users and easy to use for MCP/CLI clients:
- Keep required API headers documented when the underlying API requires them. For example,
x-api-keyis required for direct Formaloo API calls and should remain visible in the spec. - Header requirements follow one rule in the MCP artifact:
x-api-keyis required on every operation, andx-workspaceandAuthorizationare required on every operation that documents them. An operation that does not need a workspace or a token omits the header instead of marking it optional.scripts/build-mcp-openapi.mjsenforces this andscripts/validate-mcp-openapi.mjsfails the build when an operation drifts. - Successful deletes answer with
200, not204. The MCP build rewrites the generated204responses and the validator rejects anyDELETEoperation that lacks200or still declares204. The publicopenapi-v3.0.yamlartifact still mirrors the upstream204because it is not rewritten. - When a hosted MCP server or CLI has a configured Formaloo API key, the client should inject that configured value instead of asking the user or agent to provide
x-api-keyfor each tool call. - Describe product terminology in user-facing language first, then mention legacy API terms where needed. For example, use “workspace” first and explain that API paths may still use “business”.
- For high-value MCP operations, include clear summaries, examples, result paths, pagination notes, and
x-formaloo-mcpmetadata so agents can choose the right operation without guessing from raw operation IDs. - Magic AI endpoints support Formaloo dashboard/product AI experiences. Document them where applicable, but curate MCP/CLI usage case by case. Prefer stable resource contracts such as forms, fields, themes, rows, form-display submission, and file/import flows unless a Magic endpoint has a clear integration value, such as Magic Import.
Manual descriptions are stored as Markdown files matching the endpoint path and HTTP method. For example, the endpoint PATCH /v3.0/forms/{slug}/ uses:
spec/docs/v3.0/forms/{slug}/patch.mdspec/docs/v3.0/forms/{slug}/put.md(if PUT is also supported)
To create local placeholder markdown files for missing endpoint docs, run:
npm run prepare-doc-stubs./generate.sh also prepares these paths during the build, but it removes temporary stubs before exiting so the worktree stays clean.
The public reference uses spec/docs/v3.0/intro.md for onboarding and version guidance.