@@ -41,9 +41,17 @@ import code.api.ResourceDocs1_4_0.ResourceDocs300.{ResourceDocs310, ResourceDocs
4141import code .api .ResourceDocs1_4_0 ._
4242import code .api ._
4343import code .api .attributedefinition .AttributeDefinition
44+ import code .api .berlin .group .v1_3 .{OBP_BERLIN_GROUP_1_3 , OBP_BERLIN_GROUP_1_3_Alias }
4445import code .api .berlin .group .ConstantsBG
46+ import code .api .STET .v1_4 .OBP_STET_1_4
47+ import code .api .Polish .v2_1_1_1 .OBP_PAPI_2_1_1_1
48+ import code .api .MxOF .{OBP_MXOF_1_0_0 , CNBV9_1_0_0 }
49+ import code .api .BahrainOBF .v1_0_0 .{ApiCollector => BahrainApiCollector }
50+ import code .api .AUOpenBanking .v1_0_0 .{ApiCollector => AUApiCollector }
51+ import code .api .UKOpenBanking .v2_0_0 .OBP_UKOpenBanking_200
52+ import code .api .UKOpenBanking .v3_1_0 .OBP_UKOpenBanking_310
4553import code .api .cache .Redis
46- import code .api .util .APIUtil .{enableVersionIfAllowed , errorJsonResponse , getPropsValue }
54+ import code .api .util .APIUtil .{enableVersionIfAllowed , versionIsAllowed , errorJsonResponse , getPropsValue }
4755import code .api .util .ApiRole ._
4856import code .api .util .ErrorMessages .MandatoryPropertyIsNotSet
4957import code .api .util ._
@@ -463,7 +471,95 @@ class Boot extends MdcLoggable {
463471 ApiVersion .setUrlPrefix(ApiPathZero )
464472
465473 // Add the various API versions
474+ val scannedApisCount = ScannedApis .versionMapScannedApis.size
475+ logger.info(s " ClassScanUtils found $scannedApisCount ScannedApis implementations " )
476+
466477 ScannedApis .versionMapScannedApis.keys.foreach(enableVersionIfAllowed) // process all scanned apis versions
478+
479+
480+ // Manual registration for ScannedApis if not already registered by ClassScanUtils
481+ // This ensures all APIs work in Fat JAR environment where class scanning fails
482+
483+ if (! ScannedApis .versionMapScannedApis.contains(ConstantsBG .berlinGroupVersion1)) {
484+ logger.warn(" BGv1.3 was NOT found by ClassScanUtils, registering manually" )
485+ if (versionIsAllowed(ConstantsBG .berlinGroupVersion1)) {
486+ LiftRules .statelessDispatch.append(OBP_BERLIN_GROUP_1_3 )
487+ logger.info(s " ${ConstantsBG .berlinGroupVersion1.fullyQualifiedVersion} was ENABLED (manual registration) " )
488+ }
489+ }
490+
491+ if (! ScannedApis .versionMapScannedApis.contains(OBP_BERLIN_GROUP_1_3_Alias .apiVersion)) {
492+ logger.warn(" BGv1.3 Alias was NOT found by ClassScanUtils, registering manually" )
493+ if (versionIsAllowed(OBP_BERLIN_GROUP_1_3_Alias .apiVersion)) {
494+ LiftRules .statelessDispatch.append(OBP_BERLIN_GROUP_1_3_Alias )
495+ logger.info(s " ${OBP_BERLIN_GROUP_1_3_Alias .apiVersion.fullyQualifiedVersion} was ENABLED (manual registration) " )
496+ }
497+ }
498+
499+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .stetV14)) {
500+ logger.warn(" STET v1.4 was NOT found by ClassScanUtils, registering manually" )
501+ if (versionIsAllowed(ApiVersion .stetV14)) {
502+ LiftRules .statelessDispatch.append(OBP_STET_1_4 )
503+ logger.info(s " ${ApiVersion .stetV14.fullyQualifiedVersion} was ENABLED (manual registration) " )
504+ }
505+ }
506+
507+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .polishApiV2111)) {
508+ logger.warn(" Polish API v2.1.1.1 was NOT found by ClassScanUtils, registering manually" )
509+ if (versionIsAllowed(ApiVersion .polishApiV2111)) {
510+ LiftRules .statelessDispatch.append(OBP_PAPI_2_1_1_1 )
511+ logger.info(s " ${ApiVersion .polishApiV2111.fullyQualifiedVersion} was ENABLED (manual registration) " )
512+ }
513+ }
514+
515+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .mxofV100)) {
516+ logger.warn(" Mexico Open Finance v1.0.0 was NOT found by ClassScanUtils, registering manually" )
517+ if (versionIsAllowed(ApiVersion .mxofV100)) {
518+ LiftRules .statelessDispatch.append(OBP_MXOF_1_0_0 )
519+ logger.info(s " ${ApiVersion .mxofV100.fullyQualifiedVersion} was ENABLED (manual registration) " )
520+ }
521+ }
522+
523+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .cnbv9)) {
524+ logger.warn(" Mexico CNBV9 v1.0.0 was NOT found by ClassScanUtils, registering manually" )
525+ if (versionIsAllowed(ApiVersion .cnbv9)) {
526+ LiftRules .statelessDispatch.append(CNBV9_1_0_0 )
527+ logger.info(s " ${ApiVersion .cnbv9.fullyQualifiedVersion} was ENABLED (manual registration) " )
528+ }
529+ }
530+
531+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .bahrainObfV100)) {
532+ logger.warn(" Bahrain OBF v1.0.0 was NOT found by ClassScanUtils, registering manually" )
533+ if (versionIsAllowed(ApiVersion .bahrainObfV100)) {
534+ LiftRules .statelessDispatch.append(BahrainApiCollector )
535+ logger.info(s " ${ApiVersion .bahrainObfV100.fullyQualifiedVersion} was ENABLED (manual registration) " )
536+ }
537+ }
538+
539+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .cdsAuV100)) {
540+ logger.warn(" Australia CDS v1.0.0 was NOT found by ClassScanUtils, registering manually" )
541+ if (versionIsAllowed(ApiVersion .cdsAuV100)) {
542+ LiftRules .statelessDispatch.append(AUApiCollector )
543+ logger.info(s " ${ApiVersion .cdsAuV100.fullyQualifiedVersion} was ENABLED (manual registration) " )
544+ }
545+ }
546+
547+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .ukOpenBankingV20)) {
548+ logger.warn(" UK Open Banking v2.0.0 was NOT found by ClassScanUtils, registering manually" )
549+ if (versionIsAllowed(ApiVersion .ukOpenBankingV20)) {
550+ LiftRules .statelessDispatch.append(OBP_UKOpenBanking_200 )
551+ logger.info(s " ${ApiVersion .ukOpenBankingV20.fullyQualifiedVersion} was ENABLED (manual registration) " )
552+ }
553+ }
554+
555+ if (! ScannedApis .versionMapScannedApis.contains(ApiVersion .ukOpenBankingV31)) {
556+ logger.warn(" UK Open Banking v3.1.0 was NOT found by ClassScanUtils, registering manually" )
557+ if (versionIsAllowed(ApiVersion .ukOpenBankingV31)) {
558+ LiftRules .statelessDispatch.append(OBP_UKOpenBanking_310 )
559+ logger.info(s " ${ApiVersion .ukOpenBankingV31.fullyQualifiedVersion} was ENABLED (manual registration) " )
560+ }
561+ }
562+
467563 enableVersionIfAllowed(ApiVersion .v1_2_1)
468564 enableVersionIfAllowed(ApiVersion .v1_3_0)
469565 enableVersionIfAllowed(ApiVersion .v1_4_0)
0 commit comments