Migrate API docs from Apiary to OpenAPI 3.1 + Scalar on GitHub Pages#3401
Open
adamkrellenstein wants to merge 11 commits into
Open
Migrate API docs from Apiary to OpenAPI 3.1 + Scalar on GitHub Pages#3401adamkrellenstein wants to merge 11 commits into
adamkrellenstein wants to merge 11 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3401 +/- ##
===========================================
+ Coverage 91.26% 91.34% +0.08%
===========================================
Files 113 113
Lines 15671 15671
===========================================
+ Hits 14302 14315 +13
+ Misses 1369 1356 -13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…upload-sarif to v3
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.
Why
counterpartycore.docs.apiary.iono longer renders (Apiary'sdocs-v4renderer returns HTTP 500 on our blueprint, while other Apiary sites still work). There is no fixing it: Oracle is retiring Apiary (announced shutdown September 2026, paid plans deprecated since 2018), and the entire API Blueprint toolchain is archived on GitHub — theapi-blueprintspec itself (2023),drafter(2024), anddredd(2024), which our CI depends on. The blueprint itself is valid (parses with drafter, warnings only); the platform is simply dead.What
Full migration to the current industry-standard stack, keeping the existing regtest-based generation workflow intact:
genapidoc.pynow emits OpenAPI 3.1 (openapi.jsonat the repo root) instead of API Blueprint (apiary.apib). Same inputs as before:routes.ROUTES, docstrings, live example responses from the regtest node,apicache.jsoncaching, mainnet address/hash conversion. Intro prose moved fromblueprint-template.mdtoapidoc/intro.md(rendered as the spec description); group docs become tag descriptions (incl. newapidoc/group-mempool.md).scenarios_test.py: runs the documented examples against the live regtest node (--phases=examples --checks=not_a_server_error, same route exclusions as the old dredd config).dredd.yml,dreddhooks.pyand thenpm install dreddCI step are removed;schemathesis==4.21.4replacesdredd_hooksin requirements.apidocs/index.html(version-pinned CDN bundle with subresource integrity) + a newapidocs.ymlworkflow that deploys on pushes tomastertouchingopenapi.json. Pages is already switched to workflow-based deploys with the custom domain configured; DNS (CNAME at Namecheap) is in place./v2/openapi.jsonserves the spec (replacing/v2/blueprint);GET /v2/root now returnsdocumentation: https://apidocs.counterparty.io/and anopenapifield with the raw-spec URL (replacingblueprint).openapi.jsonas an artifact; the committed spec comes from that artifact (run 27237951828).Breaking changes (for the next release notes)
GET /v2/blueprintremoved — replaced byGET /v2/openapi.json.GET /v2/response, theblueprintfield is replaced byopenapi, anddocumentationnow points to https://apidocs.counterparty.io/.Verification
openapi-spec-validator(OpenAPI 3.1); contains no regtest data (bcrt1count: 0; hashes converted to sequential placeholders); 182/191 operations carry real example responses.test_apiserver_openapi_speccovers the/v2/openapi.jsonroute (status, content type, version, no-regtest-data); full apiserver suite passes (34 tests).setup-python@v3/actions-rs).Note: this PR also fixes the Pylint Scanner job, which it had inadvertently broken: installing schemathesis bumps
jsonschemato ≥4.18, whose resolver rewrite crashes the unmaintainedpylint2sarif. The scanner job now pinsjsonschema<4.18(scan-only env) andupload-sarifis bumped to v3 (v2 is deprecated). Root cause reproduced and fix verified in a clean local venv.Rollout
Docs go live when this reaches
master(the Pages workflow triggers on master pushes). Companion PRs updating links, to merge once the site is live: CounterpartyXCP/Documentation#258 and CounterpartyXCP/Website#24.@ouziel-slama — this touches your doc-generation pipeline; review much appreciated.