mirror of
https://github.com/Glitchy-Sheep/boosty-downloader.git
synced 2026-10-14 21:33:23 +00:00
[PR #203] [MERGED] chore(scripts): build an observed OpenAPI document of the Boosty API #202
Labels
No labels
api-drift
bug
ci
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Glitchy-Sheep/boosty-downloader#202
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/203
Author: @Glitchy-Sheep
Created: 9/22/2026
Status: ✅ Merged
Merged: 9/22/2026
Merged by: @Glitchy-Sheep
Base:
main← Head:feat/api-schema-snapshot📝 Commits (3)
fba0390[scripts] Infer an OpenAPI document from Boosty answersf6ffb0f[scripts] Add task api:schema that writes docs/api/boosty-api.yamla77594c[scripts] Name the api_schema modules and functions after what they do📊 Changes
13 files changed (+1914 additions, -1 deletions)
View changed files
📝
Taskfile.yml(+15 -0)➕
docs/api/README.md(+27 -0)➕
docs/api/boosty-api.yaml(+883 -0)📝
pyproject.toml(+2 -0)📝
pyrightconfig.json(+1 -1)➕
scripts/api_schema/__init__.py(+9 -0)➕
scripts/api_schema/__main__.py(+133 -0)➕
scripts/api_schema/live_api.py(+127 -0)➕
scripts/api_schema/observed_shapes.py(+151 -0)➕
scripts/api_schema/openapi_document.py(+222 -0)➕
scripts/api_schema/unread_keys.py(+58 -0)➕
test/unit/api_schema/observed_shapes_test.py(+136 -0)➕
test/unit/api_schema/openapi_document_test.py(+150 -0)📄 Description
📝 Summary
Boosty has no API spec, and our models read only part of each answer. This PR adds a dev tool that writes what Boosty really sends as an OpenAPI 3.1 file, shapes and counts only, and commits the first file.
🔧 What changes
task api:schema -- <blog>writesdocs/api/boosty-api.yamlfrom live answers: one listing page per blog plus the newest post through the single-post endpoint. The token comes fromBOOSTY_TOKEN,config.yamlor.env;--anonymoussends none,--pages Nreads more pages.Post,PostsPageand oneChunk*component per chunk kind.x-presence: how often an optional key came.x-seen-values: the vocabulary oftype-like fields.x-unread-by-client: keys our models ignore.ok_video.docs/api/README.mdexplains how to regenerate the file, how to read it and its limits.scripts/, so the dev tools there have unit tests.💡 Why
📌 Notes
ci/skip-changelog: nothing changes for users.🧪 Tests
openapi-spec-validatorpasses.⏭️ Next
updatemode that merges new observations into the file.✅ Checklist
--helpand README if neededdocs/if the download flow or dev process changed## Unreleasedin CHANGELOG.md (or theci/skip-changeloglabel if not user-facing)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.