docs(hatchery): point the API pages at a URL that exists - #257
Open
annejan wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 anymore:
/docsreturns the document itself, asapplication/jsonand withAccess-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:/v2/devicesmch2022,troopers23/v2/mch2022/types/v2/mch2022/esp32/categories/v2/mch2022/esp32/utility/v2/mch2022/esp32/utility/esp32_test_appREADME.md,icon.png,main.binNote
hatchery.badge.teamandmch2022.badge.teamare separate instances withseparate device lists — the MCH2022 badge only talks to the latter, and
mch2022is not a device on the former. That is why the two pages point atdifferent hosts, and both are now correct.
hugo --gc --minifyclean.🤖 Generated with Claude Code
https://claude.ai/code/session_0142DuVFXpWnjeQhZzT3N3nC