S-08b — libs/api-client, a generated typed client for the BFF (§10: generated, never
hand-written). Generated from services/bff/openapi.json with orval (Angular target → an
injectable BffApiV1Service on HttpClient), so the DigiD bearer can later be attached by an HttpInterceptor (S-08c). Consumed by the self-service form next.
Generator: orval (node-based) — no Java, so it runs in the pnpm/Node lane; emits an Angular HttpClient service (interceptor-friendly). Config: libs/api-client/orval.config.ts. Regenerate
with nx run api-client:generate (idempotent; src/lib/generated/ is never hand-edited).
Tested against a mocked BFF via HttpClientTesting: POST /self-service/registrations and GET /openbaar/register?q=…, mapping typed SubmitAccepted / OpenbaarEntry.
Normalised the Nx vitest target to test (was vite:test) so app + libs share the target and make frontend's run-many -t test covers libraries too.
The BFF endpoints have no operationId, so orval synthesises method names — adding explicit
operation ids to the BFF is possible later polish (noted in frontend-decisions).
Large diff is mostly the generated client + lockfile.
## What & why
**S-08b** — `libs/api-client`, a **generated** typed client for the BFF (§10: generated, never
hand-written). Generated from `services/bff/openapi.json` with **orval** (Angular target → an
injectable `BffApiV1Service` on `HttpClient`), so the DigiD bearer can later be attached by an
`HttpInterceptor` (S-08c). Consumed by the self-service form next.
Closes #66
## Definition of Done
- [x] Linked Gitea issue (above).
- [x] Failing test before implementation (barrel didn't export the client → red; export → green).
- [x] Conventional Commits referencing the issue (`refs #66`).
- [x] CI: `frontend` lane covers it (lint + test); generation is a repeatable `nx` target.
- [x] Docs — `docs/frontend-decisions.md` entry (generator choice + regen command).
- [x] Not user-visible → no demo-script note.
## Notes for reviewers
- **Generator: orval (node-based)** — no Java, so it runs in the pnpm/Node lane; emits an Angular
`HttpClient` service (interceptor-friendly). Config: `libs/api-client/orval.config.ts`. Regenerate
with **`nx run api-client:generate`** (idempotent; `src/lib/generated/` is never hand-edited).
- **Tested against a mocked BFF** via `HttpClientTesting`: `POST /self-service/registrations` and
`GET /openbaar/register?q=…`, mapping typed `SubmitAccepted` / `OpenbaarEntry`.
- Normalised the Nx vitest target to **`test`** (was `vite:test`) so app + libs share the target and
`make frontend`'s `run-many -t test` covers libraries too.
- The BFF endpoints have no `operationId`, so orval synthesises method names — adding explicit
operation ids to the BFF is possible later polish (noted in frontend-decisions).
- Large diff is mostly the generated client + lockfile.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Scaffold libs/api-client (Nx Angular lib) and generate a typed HttpClient client
from services/bff/openapi.json with orval (node-based; Angular target integrates
with HttpClient interceptors for the S-08c auth token). A failing test drives the
public API: it expects an injectable BffApiV1Service to POST /self-service/registrations
and GET /openbaar/register (via HttpClientTesting), but the lib barrel doesn't export
the client yet, so it fails. Normalise the vitest target to 'test'. Green exposes it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The lib barrel exports the generated BffApiV1Service + models (SubmitAccepted,
OpenbaarEntry), so the app can inject a typed client for the BFF. Add an
'api-client:generate' target (orval) to regenerate from services/bff/openapi.json;
generation is idempotent. Tests (HttpClientTesting) now pass: POST /self-service/
registrations and GET /openbaar/register with the query, mapping typed responses.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What & why
S-08b —
libs/api-client, a generated typed client for the BFF (§10: generated, neverhand-written). Generated from
services/bff/openapi.jsonwith orval (Angular target → aninjectable
BffApiV1ServiceonHttpClient), so the DigiD bearer can later be attached by anHttpInterceptor(S-08c). Consumed by the self-service form next.Closes #66
Definition of Done
refs #66).frontendlane covers it (lint + test); generation is a repeatablenxtarget.docs/frontend-decisions.mdentry (generator choice + regen command).Notes for reviewers
HttpClientservice (interceptor-friendly). Config:libs/api-client/orval.config.ts. Regeneratewith
nx run api-client:generate(idempotent;src/lib/generated/is never hand-edited).HttpClientTesting:POST /self-service/registrationsandGET /openbaar/register?q=…, mapping typedSubmitAccepted/OpenbaarEntry.test(wasvite:test) so app + libs share the target andmake frontend'srun-many -t testcovers libraries too.operationId, so orval synthesises method names — adding explicitoperation ids to the BFF is possible later polish (noted in frontend-decisions).
🤖 Generated with Claude Code