Commit b6fcf11
docs(api): publish MyFestival OpenAPI spec via Redoc at /api-docs/ (#428)
* docs(api): publish MyFestival OpenAPI spec via Redoc at /api-docs/
Adds a Redoc-rendered API docs page at /api-docs/ in the Cloudflare Pages
deployment. The OpenAPI spec is generated from proto at build time (not
committed), consistent with the proto-in-CI pattern from #426.
- web/api-docs/index.html: Redoc page loading openapi.yaml from jsDelivr CDN
- web/api-docs/.gitignore: openapi.yaml is generated, not committed
- web/_headers: /api-docs/* CSP override allowing cdn.jsdelivr.net for Redoc
- ci.yml build-web: buf generate + copy openapi.yaml before flutter build
- mise.dev.toml proto:generate: also copies to web/api-docs/ for local dev
https://claude.ai/code/session_015uTnGiC56cEELZMH2cQQU4
* docs: add API docs link to README
https://claude.ai/code/session_015uTnGiC56cEELZMH2cQQU4
* fix(api-docs): exempt /api-docs/ from Flutter SPA catch-all rewrite
Cloudflare Pages does not resolve implicit directory indexes before
evaluating _redirects rewrite rules, so /api-docs/ was being caught by
/* /index.html 200 before the Redoc page could be served.
Adding explicit /api-docs and /api-docs/ rules before the catch-all
routes those two paths to /api-docs/index.html directly.
https://claude.ai/code/session_015uTnGiC56cEELZMH2cQQU4
* fix(api-docs): serve Redoc from self rather than CDN to avoid CSP issues
Downloading redoc.standalone.js at build time (CI) and local dev
(proto:generate) so it is served from 'self', which the existing
Flutter CSP already allows. Removes the /api-docs/* CSP override
that was added to permit cdn.jsdelivr.net.
https://claude.ai/code/session_015uTnGiC56cEELZMH2cQQU4
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9dfc334 commit b6fcf11
6 files changed
Lines changed: 47 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
197 | 205 | | |
198 | 206 | | |
199 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
5 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
0 commit comments