werkator build succeeded after 00:39
Co-authored-by: claude-code <claude-code@javagil.de>
2.6 KiB
2.6 KiB
PR#23: Taiga's API Address from Its conf.json
WARNING: This document describes only the change applied in this PR. It may already be outdated once the next PR is merged. Historic PR documentation is not maintained along with new PRs; treat it as a snapshot.
Related Links
- werkregie PR#21: the Taiga source.
Problem
werkregie PR#21 assumed Taiga's API below the web address, at <url>/api/v1.
The user's Taiga serves its API from a host of its own;
below the web address it answers every path with the page of its web app.
Taiga's own web app finds its API in <url>/conf.json, field api.
Non-Goals
- No other change of the Taiga source.
Specification
Feature: the address of Taiga's API
Scenario#23.01: the API where conf.json says
… so that a Taiga with its API on a host of its own works with its web address alone.
- Given a Taiga whose
conf.jsonnames its API at another address - When the dashboard reads it
- Then login and reading go to that address
Verified by
- TaigaSourceTest: "the API lies where Taiga's conf.json says, e.g. on a host of its own".
Scenario#23.02: a configured apiUrl wins
… so that the user can name the API where conf.json is wrong or missing.
- Given a task board with
apiUrl - When the dashboard reads it
- Then login and reading go to
apiUrl, whateverconf.jsonsays
Verified by
- TaigaSourceTest: "a configured apiUrl wins over conf.json".
Scenario#23.03: without a usable conf.json the API lies below the pages
… so that a Taiga with its API at <url>/api/v1 still works.
- Given a Taiga without
conf.json, or one that answers it with its web page - When the dashboard reads it
- Then login and reading go to
<url>/api/v1
Verified by
- TaigaSourceTest: "a conf.json that is a web page leaves the API below the pages";
the older tests run against a fake without
conf.json.
Solution
TaigaSourceasks<url>/conf.jsononce for the fieldapi; a 404 or a web page leads to<url>/api/v1, a network error is not cached.apiUrlin the task board overrides it.- A missing user, password or project is reported before any request.
- The example configurations,
dashboard/README.mdand the Werkbaum name it. - Version 0.9.2.
Open Questions
None.