feat: v0.5.0 — machine-readable API docs: GET /api/version + OpenAPI 3.1 spec at /api/openapi; AGENTS.md points agents at the live spec

This commit is contained in:
2026-09-17 10:15:25 +00:00
parent 1c50cfeab2
commit 4d9a1e9fa9
9 changed files with 226 additions and 1 deletions
+8
View File
@@ -10,3 +10,11 @@
1. **Compose instance is the app under test** — e2e always runs against the docker-compose build behind Traefik (`https://flight.dev.kkhost.pl`), never a local `next dev` on :3000 (dev builds don't render for non-loopback clients, and a second instance splits state).
2. **Update before testing** — deploy current code first: `docker compose up -d --build`.
3. **Remote browsers** — tests run through the shared Playwright server at `192.168.1.4:3000` (Docker image tag must match this repo's @playwright/test version); plain `npx playwright test` handles deploy + readiness + remote connect (see `playwright.config.ts`).
## API
1. **Live base URL** — `https://flight.dev.kkhost.pl` (the docker-compose build behind Traefik).
2. **Machine-readable spec** — OpenAPI 3.x at `https://flight.dev.kkhost.pl/api/openapi`; current app version at `/api/version`.
3. **Spec lives in code** — generated from `lib/openapi.ts`, served by `app/api/openapi/route.ts`; must be updated whenever an endpoint changes.
## Other
1. For longer terminal tasks you should use pty_* tools.