Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/update-api-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Update BitGo Express API docs

# Kept manual until the first OpenAPI batch is added to openapi-index.ts.
on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}

permissions:
contents: read
id-token: write

jobs:
generate-and-update-api-docs:
uses: BitGo/gha-dev-portal-updater/.github/workflows/generate-and-update.yml@645bcc9d1e669f5b53eebc0121eede056569ca1a # v5.38.0
with:
target-repo: api-docs
service-name: openapi-express
types-package-path: ./modules/express
api-spec-file: src/typedRoutes/api/openapi-index.ts
api-spec-title: BitGo Express API
codec-config-file: ./modules/express/openapi-generator.rc.js
remote-working-directory: ''
secrets: inherit
14 changes: 14 additions & 0 deletions modules/express/src/typedRoutes/api/openapi-index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { apiSpec } from '@api-ts/io-ts-http';
import { GetV1Ping } from './v1/ping';

/**
* Cumulative OpenAPI batch entrypoint.
*
* Add approved route specs here as they are introduced. Keep previously added
* routes in this object so generated/openapi-express.yaml remains cumulative.
*/
export const ExpressOpenApiSpec = apiSpec({
'express.v1.ping': {
get: GetV1Ping,
},
});
Loading