Skip to content

Commit

Permalink
Merge pull request #133 from Archie-Finance/patch/swagger
Browse files Browse the repository at this point in the history
Patch/swagger
  • Loading branch information
acuderman authored Oct 11, 2022
2 parents f4e51dc + 48dcb61 commit 2b5a660
Show file tree
Hide file tree
Showing 77 changed files with 1,063 additions and 1,130 deletions.
6 changes: 3 additions & 3 deletions apps/credit-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build credit-api && node dist/apps/credit-api/main build-swagger"
"command": "npm run build credit-api && RUN_MIGRATIONS=false node dist/apps/credit-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build credit-api && node dist/apps/credit-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/credit-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ import { RedisModule } from '@archie-microservices/api/utils/redis';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations,
}),
Expand Down
2 changes: 1 addition & 1 deletion apps/credit-line-api/integration/credit_line.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('Credit line creation tests', () => {
const response = await request(app.getHttpServer())
.post('/v2/credit_lines')
.set('Authorization', `Bearer ${accessToken}`)
.expect(400);
.expect(409);

expect(response.body.message).toStrictEqual('CREDIT_LINE_ALREADY_EXISTS');
});
Expand Down
6 changes: 3 additions & 3 deletions apps/credit-line-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build credit-line-api && node dist/apps/credit-line-api/main build-swagger"
"command": "npm run build credit-line-api && RUN_MIGRATIONS=false node dist/apps/credit-line-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build credit-line-api && node dist/apps/credit-line-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/credit-line-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ import { AuthModule } from '@archie/api/utils/auth0';
keepConnectionAlive: true,
autoLoadEntities: true,
migrations: migrations,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
}),
inject: [ConfigService],
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/fireblocks-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build fireblocks-api && node dist/apps/fireblocks-api/main build-swagger"
"command": "npm run build fireblocks-api && RUN_MIGRATIONS=false node dist/apps/fireblocks-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build fireblocks-api && node dist/apps/fireblocks-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/fireblocks-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ import { AuthModule } from '@archie/api/utils/auth0';
keepConnectionAlive: true,
autoLoadEntities: true,
migrations: migrations,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
}),
inject: [ConfigService],
}),
Expand Down
10 changes: 4 additions & 6 deletions apps/ledger-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
"assets": [
"apps/ledger-api/src/assets"
],
"tsPlugins": [
"@nestjs/swagger/plugin"
]
"tsPlugins": ["@nestjs/swagger/plugin"]
},
"configurations": {
"production": {
Expand Down Expand Up @@ -56,13 +54,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build ledger-api && node dist/apps/ledger-api/main build-swagger"
"command": "npm run build ledger-api && RUN_MIGRATIONS=false node dist/apps/ledger-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build ledger-api && node dist/apps/ledger-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/ledger-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ import { SERVICE_NAME } from '@archie/api/credit-api/constants';
keepConnectionAlive: true,
autoLoadEntities: true,
migrations: migrations,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
}),
inject: [ConfigService],
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/ltv-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build ltv-api && node dist/apps/ltv-api/main build-swagger"
"command": "npm run build ltv-api && RUN_MIGRATIONS=false node dist/apps/ltv-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build ltv-api && node dist/apps/ltv-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/ltv-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ import { RedisModule } from '@archie-microservices/api/utils/redis';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations,
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/mail-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build mail-api && node dist/apps/mail-api/main build-swagger"
"command": "npm run build mail-api && RUN_MIGRATIONS=false node dist/apps/mail-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build mail-api && node dist/apps/mail-api/main generate-migration"
}
Expand Down
6 changes: 3 additions & 3 deletions apps/onboarding-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build onboarding-api && node dist/apps/onboarding-api/main build-swagger"
"command": "npm run build onboarding-api && RUN_MIGRATIONS=false node dist/apps/onboarding-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build onboarding-api && node dist/apps/onboarding-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/onboarding-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ import { QueueModule } from '@archie/api/utils/queue';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations,
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/paypal-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build paypal-api && node dist/apps/paypal-api/main build-swagger"
"command": "npm run build paypal-api && RUN_MIGRATIONS=false node dist/apps/paypal-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build paypal-api && node dist/apps/paypal-api/main generate-migration"
}
Expand Down
9 changes: 5 additions & 4 deletions apps/paypal-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@archie/api/paypal-api/constants';
import { QueueModule } from '@archie/api/utils/queue';
import { HealthModule } from '@archie/api/utils/health';
import { PaypalModule } from '@archie/api/paypal-api/paypal'
import { PaypalModule } from '@archie/api/paypal-api/paypal';
import { migrations } from './migrations';
import { AuthModule } from '@archie/api/utils/auth0';

Expand All @@ -23,7 +23,7 @@ import { AuthModule } from '@archie/api/utils/auth0';
ConfigVariables.PAYPAL_CLIENT_ID,
ConfigVariables.PAYPAL_CLIENT_SECRET,
ConfigVariables.PAYPAL_API_URL,
ConfigVariables.PAYPAL_RETURN_URL
ConfigVariables.PAYPAL_RETURN_URL,
],
}),
TypeOrmModule.forRootAsync({
Expand All @@ -38,9 +38,10 @@ import { AuthModule } from '@archie/api/utils/auth0';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations
migrations: migrations,
}),
inject: [ConfigService],
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/peach-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build peach-api && node dist/apps/peach-api/main build-swagger"
"command": "npm run build peach-api && RUN_MIGRATIONS=false node dist/apps/peach-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build peach-api && node dist/apps/peach-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/peach-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ import { seeds } from './seeds';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: [...migrations, ...seeds],
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/referral-system-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build referral-system-api && node dist/apps/referral-system-api/main build-swagger"
"command": "npm run build referral-system-api && RUN_MIGRATIONS=false node dist/apps/referral-system-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build referral-system-api && node dist/apps/referral-system-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/referral-system-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import { SalesConnectModule } from '@archie/api/referral-system-api/sales-connec
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations,
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/user-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build user-api && node dist/apps/user-api/main build-swagger"
"command": "npm run build user-api && RUN_MIGRATIONS=false node dist/apps/user-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build user-api && node dist/apps/user-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/user-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import { QueueModule } from '@archie/api/utils/queue';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations,
}),
Expand Down
6 changes: 3 additions & 3 deletions apps/webhook-api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
}
},
"build-openapi": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build webhook-api && node dist/apps/webhook-api/main build-swagger"
"command": "npm run build webhook-api && RUN_MIGRATIONS=false node dist/apps/webhook-api/main build-swagger"
}
},
"generate-migration": {
"executor": "@nrwl/workspace:run-commands",
"executor": "nx:run-commands",
"options": {
"command": "npm run build webhook-api && node dist/apps/webhook-api/main generate-migration"
}
Expand Down
3 changes: 2 additions & 1 deletion apps/webhook-api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import { FireblocksWebhookModule } from '@archie/api/webhook-api/fireblocks';
synchronize: false,
autoLoadEntities: true,
keepConnectionAlive: true,
migrationsRun: true,
migrationsRun:
configService.get(ConfigVariables.RUN_MIGRATIONS) !== 'false',
migrationsTableName: `${SERVICE_NAME}-migrations`,
migrations: migrations,
}),
Expand Down
1 change: 1 addition & 0 deletions libs/api/credit-api/constants/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum ConfigVariables {
QUEUE_URL = 'QUEUE_URL',
ENCRYPTION_KEY = 'ENCRYPTION_KEY',
REDIS_URL = 'REDIS_URL',
RUN_MIGRATIONS = 'RUN_MIGRATIONS',
}

export const COLLATERAL_RECEIVED_TOPIC = 'credit.collateral.received';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ComplianceDocumentAcknowledgementRequest,
CustomerDetails,
} from '../api/rize_api.interfaces';
import { GetKycResponse } from '@archie/api/user-api/kyc';
import { GetKycResponse } from '@archie/api/user-api/data-transfer-objects';

@Injectable()
export class RizeFactoryService {
Expand Down
Loading

0 comments on commit 2b5a660

Please sign in to comment.