Skip to content

Commit be54765

Browse files
committed
chore: added openapi-generator.rc.js file
TICKET: WP-6196 feat: add openapi-config and tags to express ticket: WP-6196 revert: changes TICKET: WP-6196 revert: changes TICKET: WP-6196 refactor: remove duplicate file TICKET: WP-6196
1 parent 7d1d3d8 commit be54765

26 files changed

+48
-4
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* OpenAPI Generator Configuration
3+
* No custom configuration needed for Express module so far.
4+
* NOTE: This file is not being passed into the openapi-generator
5+
*/
6+
7+
module.exports = (E) => {
8+
return {
9+
'.': {
10+
JsonFromStringifiedJson: () => E.right({ type: 'string' }),
11+
},
12+
'io-ts-types': {
13+
Json: () => E.right({ type: 'object', properties: {}, required: [] }),
14+
NonEmptyString: () => E.right({ type: 'string', minLength: 1 }),
15+
},
16+
};
17+
};

modules/express/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"description": "Local signing server and proxy for the BitGo platform",
66
"main": "./dist/src/index.js",
7+
"source": "src/typedRoutes/api/index.ts",
78
"types": "./dist/src/index.d.ts",
89
"bin": {
910
"bitgo-express": "./bin/bitgo-express"

modules/express/src/typedRoutes/api/common/calculateMinerFeeInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const CalculateMinerFeeInfoResponse = t.type({
3939
* 4. The fee rate (in satoshis per kilobyte)
4040
*
4141
* @operationId express.calculateminerfeeinfo
42+
* @tag express
4243
*/
4344
export const PostCalculateMinerFeeInfo = httpRoute({
4445
path: '/api/v[12]/calculateminerfeeinfo',

modules/express/src/typedRoutes/api/common/decrypt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const DecryptRequestBody = {
1111
* Decrypt
1212
*
1313
* @operationId express.decrypt
14+
* @tag express
1415
*/
1516
export const PostDecrypt = httpRoute({
1617
path: '/api/v[12]/decrypt',

modules/express/src/typedRoutes/api/common/encrypt.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const EncryptRequestBody = {
1212
* Encrypt
1313
*
1414
* @operationId express.encrypt
15+
* @tag express
1516
*/
1617
export const PostEncrypt = httpRoute({
1718
path: '/api/v[12]/encrypt',

modules/express/src/typedRoutes/api/common/login.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const LoginRequest = {
4242
* Login
4343
*
4444
* @operationId express.login
45+
* @tag express
4546
*/
4647
export const PostLogin = httpRoute({
4748
path: '/api/v[12]/user/login',

modules/express/src/typedRoutes/api/common/ping.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BitgoExpressError } from '../../schemas/error';
66
* Ping
77
*
88
* @operationId express.ping
9+
* @tag express
910
*/
1011
export const GetPing = httpRoute({
1112
path: '/api/v[12]/ping',

modules/express/src/typedRoutes/api/common/pingExpress.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BitgoExpressError } from '../../schemas/error';
66
* Ping Express
77
*
88
* @operationId express.pingExpress
9+
* @tag express
910
*/
1011
export const GetPingExpress = httpRoute({
1112
path: '/api/v[12]/pingexpress',

modules/express/src/typedRoutes/api/common/verifyAddress.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const VerifyAddressBody = {
1010
* Verify Address
1111
*
1212
* @operationId express.verifyaddress
13+
* @tag express
1314
*/
1415
export const PostVerifyAddress = httpRoute({
1516
path: '/api/v[12]/verifyaddress',

modules/express/src/typedRoutes/api/v1/acceptShare.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const AcceptShareRequestBody = {
2424
*
2525
* @tag express
2626
* @operationId express.v1.wallet.acceptShare
27+
* @tag express
2728
*/
2829
export const PostAcceptShare = httpRoute({
2930
path: '/api/v1/walletshare/{shareId}/acceptShare',

0 commit comments

Comments
 (0)