Skip to content

Commit d6fe130

Browse files
committed
chore(express): scaffold batched OpenAPI generation
- Add a cumulative OpenAPI batch entrypoint for Express routes - Add the initial /api/v1/ping endpoint specification - Configure the docs updater for the openapi-express service - Target api-docs/services/openapi-express.yaml - Keep the workflow manual until the first batch is reviewed - Support adding additional endpoints incrementally in later PRs Ticket: WCI-1581
1 parent f9e04f9 commit d6fe130

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Update BitGo Express API docs
3+
4+
# Kept manual until the first OpenAPI batch is added to openapi-index.ts.
5+
on:
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
jobs:
16+
generate-and-update-api-docs:
17+
uses: BitGo/gha-dev-portal-updater/.github/workflows/generate-and-update.yml@645bcc9d1e669f5b53eebc0121eede056569ca1a # v5.38.0
18+
with:
19+
target-repo: api-docs
20+
service-name: platform-express
21+
types-package-path: ./modules/express
22+
api-spec-file: src/typedRoutes/api/openapi-index.ts
23+
api-spec-title: BitGo Express API
24+
codec-config-file: ./modules/express/openapi-generator.rc.js
25+
remote-working-directory: ''
26+
secrets: inherit
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { apiSpec } from '@api-ts/io-ts-http';
2+
import { PostWalletSweep } from './v2/walletSweep';
3+
4+
/**
5+
* Cumulative OpenAPI batch entrypoint.
6+
*
7+
* Add approved route specs here as they are introduced. Keep previously added
8+
* routes in this object so generated/openapi-express.yaml remains cumulative.
9+
*/
10+
export const ExpressOpenApiSpec = apiSpec({
11+
'express.wallet.sweep': {
12+
post: PostWalletSweep,
13+
},
14+
});

0 commit comments

Comments
 (0)