Skip to main content

Schema Reference

This page is an auto-generated catalog of every JPA entity Query Studio's autocomplete sees. It mirrors the response of GET /api/v1/workbench/schema/entities/{entity} for every entity returned by GET /api/v1/workbench/schema/entities.

The reference is regenerated at every documentation build. If you don't see a recently-added entity below, the docs build pipeline needs to re-run against a backend that has the new entity deployed.

How to regenerate

The build script lives at billerang-docs/scripts/build-schema-reference.mjs. It hits a running Billerang instance, walks the schema endpoint, and rewrites this page's body between the markers <!-- AUTO-GEN START --> and <!-- AUTO-GEN END -->.

# from billerang-docs/
WORKBENCH_API=https://staging.billerang.com BEARER=$TOKEN \
node scripts/build-schema-reference.mjs

The script is also wired into the Docusaurus build via a pre-build hook so a routine pnpm build rebuilds the reference. If the API isn't reachable, the script falls back to a cached JSON snapshot in billerang-docs/.schema-cache.json so the docs site can still build offline.

Auto-generated content

The schema reference will appear here after the first build. Run the regenerate command above to populate it.

In the meantime, this is what each entity entry looks like:

### BillingAccount

| Field | Java type | DB column | FK target | Nullable |
| --- | --- | --- | --- | --- |
| code | String | code | — | false |
| status | BillingAccountStatusEnum | status | — | true |
| customerAccount | CustomerAccount | customer_account_id | customer_account | true |
| auditable.created | Date | created | — | true |
| ... | ... | ... | ... | ... |

Field-mapping notes

A few quirks worth flagging — every entry below applies to the autocomplete provider as well:

  • Embeddables: auditable.created / auditable.updated etc. expand into the full Auditable block as columns on the parent table (created, updated, creator, updater).
  • FKs: every @ManyToOne/@OneToOne is shown with isFK: true plus references: <table_name>. The autocomplete inserts the Java path (Deep mode) or the FK column (Expert mode).
  • Custom fields: anything stored under cf_values (jsonb) is not in the schema reference. Custom fields are accessible via entity.getCfValue("fieldCode") in scripts and via the cf_values jsonb column in Expert mode (use cf_values @> '{"FIELD": "VALUE"}').
  • Inheritance: subclasses (OneShotChargeTemplate, RecurringChargeTemplate, …) share the parent's table for single-table-inheritance entities. The reference lists each subclass separately with its discriminator-specific columns called out.

Searching the reference

For now this page is one long list — Ctrl+F is the search. A planned V2 enhancement is a sidebar of entities + a search-as-you-type filter, generated as a Docusaurus React component during the build step.