Skip to content

Commit 199df9f

Browse files
authored
refactor(express): changed route path as per openapi
2 parents 89978ff + e8700b2 commit 199df9f

15 files changed

+15
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const ConsolidateUnspentsResponse = t.array(
7575
* @operationId express.v1.wallet.consolidateunspents
7676
*/
7777
export const PutConsolidateUnspents = httpRoute({
78-
path: '/api/v1/wallet/:id/consolidateunspents',
78+
path: '/api/v1/wallet/{id}/consolidateunspents',
7979
method: 'PUT',
8080
request: httpRequest({
8181
params: ConsolidateUnspentsRequestParams,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const ConstructPendingApprovalTxResponse = t.type({
6363
* @operationId express.v1.pendingapproval.constructTx
6464
*/
6565
export const PutConstructPendingApprovalTx = httpRoute({
66-
path: '/api/v1/pendingapprovals/:id/constructTx',
66+
path: '/api/v1/pendingapprovals/{id}/constructTx',
6767
method: 'PUT',
6868
request: httpRequest({
6969
params: ConstructPendingApprovalTxRequestParams,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const FanoutUnspentsResponse = t.type({
6363
* @operationId express.v1.wallet.fanoutunspents
6464
*/
6565
export const PutFanoutUnspents = httpRoute({
66-
path: '/api/v1/wallet/:id/fanoutunspents',
66+
path: '/api/v1/wallet/{id}/fanoutunspents',
6767
method: 'PUT',
6868
request: httpRequest({
6969
params: FanoutUnspentsRequestParams,

modules/express/src/typedRoutes/api/v2/coinSignTx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const CoinSignTxResponse = {
141141
* @operationId express.v2.coin.signtx
142142
*/
143143
export const PostCoinSignTx = httpRoute({
144-
path: '/api/v2/:coin/signtx',
144+
path: '/api/v2/{coin}/signtx',
145145
method: 'POST',
146146
request: httpRequest({
147147
params: CoinSignTxParams,

modules/express/src/typedRoutes/api/v2/lightningInitWallet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const LightningInitWalletResponse = {
4040
* @operationId express.lightning.initWallet
4141
*/
4242
export const PostLightningInitWallet = httpRoute({
43-
path: '/api/v2/:coin/wallet/:walletId/initwallet',
43+
path: '/api/v2/{coin}/wallet/{walletId}/initwallet',
4444
method: 'POST',
4545
request: httpRequest({ params: LightningInitWalletParams, body: LightningInitWalletBody }),
4646
response: LightningInitWalletResponse,

modules/express/src/typedRoutes/api/v2/walletRecoverToken.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const RecoverTokenResponse = t.type({
6767
* @operationId express.v2.wallet.recovertoken
6868
*/
6969
export const PostWalletRecoverToken = httpRoute({
70-
path: '/api/v2/:coin/wallet/:id/recovertoken',
70+
path: '/api/v2/{coin}/wallet/{id}/recovertoken',
7171
method: 'POST',
7272
request: httpRequest({
7373
params: RecoverTokenParams,

modules/express/src/typedRoutes/api/v2/walletSignTx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export const WalletSignTxResponse = {
159159
* @operationId express.v2.wallet.signtx
160160
*/
161161
export const PostWalletSignTx = httpRoute({
162-
path: '/api/v2/:coin/wallet/:id/signtx',
162+
path: '/api/v2/{coin}/wallet/{id}/signtx',
163163
method: 'POST',
164164
request: httpRequest({
165165
params: WalletSignTxParams,

modules/express/src/typedRoutes/api/v2/walletTxSignTSS.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export const WalletTxSignTSSResponse = {
161161
* @operationId express.v2.wallet.signtxtss
162162
*/
163163
export const PostWalletTxSignTSS = httpRoute({
164-
path: '/api/v2/:coin/wallet/:id/signtxtss',
164+
path: '/api/v2/{coin}/wallet/{id}/signtxtss',
165165
method: 'POST',
166166
request: httpRequest({
167167
params: WalletTxSignTSSParams,

modules/express/test/unit/typedRoutes/coinSignTx.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ describe('CoinSignTx codec tests', function () {
980980

981981
describe('PostCoinSignTx route definition', function () {
982982
it('should have the correct path', function () {
983-
assert.strictEqual(PostCoinSignTx.path, '/api/v2/:coin/signtx');
983+
assert.strictEqual(PostCoinSignTx.path, '/api/v2/{coin}/signtx');
984984
});
985985

986986
it('should have the correct HTTP method', function () {

modules/express/test/unit/typedRoutes/consolidateUnspents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ describe('ConsolidateUnspents codec tests', function () {
640640

641641
describe('PutConsolidateUnspents route definition', function () {
642642
it('should have the correct path', function () {
643-
assert.strictEqual(PutConsolidateUnspents.path, '/api/v1/wallet/:id/consolidateunspents');
643+
assert.strictEqual(PutConsolidateUnspents.path, '/api/v1/wallet/{id}/consolidateunspents');
644644
});
645645

646646
it('should have the correct HTTP method', function () {

0 commit comments

Comments
 (0)