Skip to content

Conversation

@danielzhao122
Copy link
Contributor

@danielzhao122 danielzhao122 commented Nov 11, 2025

This PR adds automated API specification auditing as a GitHub Actions workflow that runs on every pull request. Previously, we only audited the API spec during releases, which meant API specification errors could be merged into the codebase and only discovered later in the release process.

Since the actual audit-api-spec workflow from dev-portal requires a vault token, we've implemented our own workflow that mimics the actual audit process used in dev-portal without the need of the token.
The new workflow:

  • Generates the API specification from TypeScript routes using @api-ts/openapi-generator@v5
  • Audits the generated spec using vacuum v0.18.1 (same version as dev-portal)
  • Enforces API quality rules via the same ruleset.yaml used in dev-portal

Test run that shows the audit-api-specs job fails when it detects errors: https://github.com/BitGo/BitGoJS/actions/runs/19271735416/job/55101534330?pr=7480

@danielzhao122 danielzhao122 marked this pull request as ready for review November 11, 2025 17:22
@danielzhao122 danielzhao122 requested review from a team as code owners November 11, 2025 17:22
@danielzhao122 danielzhao122 force-pushed the WP-6702-add-audit-api-specs-to-ci branch from e8f02f2 to d1bfac5 Compare November 11, 2025 17:24
Copy link
Contributor

@adityasoni-bitgo adityasoni-bitgo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@danielzhao122 danielzhao122 merged commit 080d448 into master Nov 12, 2025
14 checks passed
@danielzhao122 danielzhao122 deleted the WP-6702-add-audit-api-specs-to-ci branch November 12, 2025 18:06
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.

4 participants