Skip to content

docs(hatchery): point the API pages at a URL that exists - #257

Open
annejan wants to merge 1 commit into
masterfrom
fix-hatchery-swagger-url
Open

docs(hatchery): point the API pages at a URL that exists#257
annejan wants to merge 1 commit into
masterfrom
fix-hatchery-swagger-url

Conversation

@annejan

@annejan annejan commented Aug 14, 2026

Copy link
Copy Markdown
Member

Both Hatchery API pages have been showing "Failed to load API definition"
instead of an API.

They ask Swagger UI for /docs/api-docs.json, which neither host serves any
more:

404  https://hatchery.badge.team/docs/api-docs.json
404  https://mch2022.badge.team/docs/api-docs.json
200  https://hatchery.badge.team/docs      <- the OpenAPI document
200  https://mch2022.badge.team/docs

/docs returns the document itself, as application/json and with
Access-Control-Allow-Origin: *, so the browser can fetch it from badge.team.
Both pages now point there.

The API itself is fine

Worth recording, since "Hatchery is broken" is easy to conclude from a page
that will not load. The chain the badge actually walks all answers correctly on
mch2022.badge.team:

Endpoint Result
/v2/devices mch2022, troopers23
/v2/mch2022/types esp32, python, ice40
/v2/mch2022/esp32/categories 9 categories
/v2/mch2022/esp32/utility 11 apps
/v2/mch2022/esp32/utility/esp32_test_app detail with README.md, icon.png, main.bin

Note hatchery.badge.team and mch2022.badge.team are separate instances with
separate device lists — the MCH2022 badge only talks to the latter, and
mch2022 is not a device on the former. That is why the two pages point at
different hosts, and both are now correct.

hugo --gc --minify clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0142DuVFXpWnjeQhZzT3N3nC

Both API pages asked Swagger UI for /docs/api-docs.json. Neither host has
served that for a while — hatchery.badge.team and mch2022.badge.team both
return 404 for it, so the pages have been showing "Failed to load API
definition" instead of an API.

The OpenAPI document is at /docs itself. Both hosts return it as
application/json with Access-Control-Allow-Origin: *, so the browser can
fetch it from badge.team.

Checked while looking at this: the API behind it is healthy. On
mch2022.badge.team the chain the badge walks — /v2/devices, /v2/mch2022/types,
/v2/mch2022/esp32/categories, the app list and an app detail with its files —
all answer correctly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0142DuVFXpWnjeQhZzT3N3nC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant