/booking/api is internal — evolve it toward /v1
- Deciders: David Bauer, Julian Bäume
- Date: 2026-06-12
Status
Accepted
Amended 2026-07-08: executed for the polls surface — both frontends talk to a guidelines-conformant /booking/v1; the legacy /booking/api is still served for a transition window and its removal is a pending follow-up. New features design their API under /v1 from the start. The decision itself is unchanged.
Context
Booking replaces the Java booking-service and re-implements its /booking/api surface (paths, payload shapes, ?include=… expansion, diff-based PUT, an error contract with hex codes). Two things are easy to conflate here but pull in opposite directions:
- The
/booking/apisurface is not set in stone. Its only clients are this repository's own frontends —ui-plugin(the App Suite owner plugin) andui-poll(the public voting page) — built and released from this same repo; no external party codes against it. So the API can change freely, in lockstep with those frontends. - The database schema is what actually needs migration. Existing production data lives in a Java-service
bookingdband has to be carried over — a real, external constraint. It is already handled: the initial migration (src/migrations/booking/001-initial-schema.ts) contains a schema compatible with the Java service, so an existingbookingdbis adopted cleanly and the schema can evolve forward from there (owned by ADR-0004). We are fine on this front today.
So the migratable interface (the schema) is covered, and the API is free to change. What remains is where to take the API. Web-foundation API guidelines recommend kebab-case URLs, plural nouns, and /v1 versioning. /booking/api follows none of these, and it carries quirks inherited from the Java implementation (the JSON error key is error, not message; a duplicated error code between VOTES_POLL_ID_DOES_NOT_MATCH and FINALIZE_POLL_ID_DOES_NOT_MATCH, src/appsuite/errors.ts) that we would not choose again.
Decision
Treat /booking/api as an internal interface, not a contract.
- We reproduced the Java surface on first implementation only to reuse the ported frontends without rewriting them at the same time — not because any external party depends on it.
- Because the backend and its only clients ship from one repository,
/booking/apican change freely, in lockstep withui-plugin/ui-poll, in the same merge request. There is no compatibility burden and no migration concern on the HTTP surface. - A guidelines-conformant
/v1surface (kebab-case, plural nouns,{code, message, description}errors) is the target. We can move to it whenever it's worth the coordinated frontend change; the Java-inherited quirks persist only as long as we keep serving/booking/apiand carry no external obligation. - The interface we must not break casually is the DB schema, not the API — see ADR-0004. Keep the current initial schema (so existing production data is adopted cleanly) and evolve it forward with migrations from there.
Consequences
Positive
- No API-compatibility constraint: reshaping
/booking/apiand the/v1work are internal refactors coordinated with the two in-repo frontends — no deprecation window owed to anyone outside this repo. - Clear separation of concerns: the migration boundary is the DB schema (ADR-0004); the HTTP surface is an implementation detail.
- The Java-inherited quirks (
{code, error}, the duplicated error code) can be cleaned up in the same change that updates the frontends — they are not frozen.
Negative
- Until
/v1lands, the service exposes a non-guidelines URL/versioning scheme; new engineers may find the inconsistency with/v1-style services surprising until they read this ADR. - Changing
/booking/apimeans touchingui-plugin/ui-pollin the same MR — cheap while they live in this repo, but it does couple backend and frontend changes. - This "internal, change it freely" stance holds only while there are no external API consumers. If a documented public
/booking/api(or a third-party integration) ever appears, this ADR must be revisited.
References
src/appsuite/errors.ts(ported error catalog),src/plugins/errors.ts({code, error})ui-plugin/,ui-poll/— the only consumers of/booking/api, released with the backend- ADR-0004 — the DB schema is the real (external) migration boundary
openapi.yaml(generated from route schemas; documents the current surface)- Web-foundation API design guidelines — the target for the
/v1surface

