Skip to content

Refactor/commented v220,v210 and v200 liftweb #2804

Merged
simonredfern merged 14 commits into
OpenBankProject:developfrom
hongwei1:refactor/removeV200Lift
May 21, 2026
Merged

Refactor/commented v220,v210 and v200 liftweb #2804
simonredfern merged 14 commits into
OpenBankProject:developfrom
hongwei1:refactor/removeV200Lift

Conversation

@hongwei1
Copy link
Copy Markdown
Contributor

No description provided.

hongwei1 added 12 commits May 21, 2026 01:14
…om OBPAPI5_1_0/6_0_0

- OBPAPI2_2_0: routes=Nil, allResourceDocs aggregates from OBPAPI2_1_0+Http4s220
- Re-export Implementations2_2_0/2_0_0 for downstream test compatibility
- Drop APIMethods220 mixin from OBPAPI5_1_0 and OBPAPI6_0_0
- Add v2_2_0 skip filter in ResourceDocsAPIMethods activeResourceDocs match
- JSONFactory1_4_0Test: use OBPAPI2_1_0.allResourceDocs.head as Lift doc reference
…om OBPAPI5_1_0/6_0_0

- OBPAPI2_1_0: routes=Nil, allResourceDocs aggregates from OBPAPI2_0_0+Http4s210
- Re-export Implementations2_1_0 for downstream test compatibility
- Drop APIMethods210 mixin from OBPAPI5_1_0 and OBPAPI6_0_0
- Add v2_1_0 skip filter in ResourceDocsAPIMethods activeResourceDocs match
- JSONFactory1_4_0Test: use OBPAPI2_0_0.allResourceDocs.head as Lift doc reference
- EntitlementTests: change ResourceDocs220.Implementations2_1_0 to Http4s210.Implementations2_1_0
…types return 400 not 404

Without APIMethods210 Lift stub in place, the guard caused invalidTransactionRequestType
to fall through to 404 instead of being caught by the handler which returns 400.
…ookup in createTransactionRequest

When middleware finds no matching ResourceDoc (invalid type), cc.bankAccount is None.
Move the type validity check before the account IO step so invalid types return
400 InvalidTransactionRequestType instead of 400 AccountNotFound.
…to Http4s200

- OBPAPI2_0_0: routes=Nil, allResourceDocs aggregates from OBPAPI1_4_0+Http4s200
- Re-export Implementations2_0_0 for downstream test compatibility
- Port processAccounts helper into Http4s200.Implementations2_0_0
- Update Http4s400 to reference Http4s200.Implementations2_0_0.processAccounts
- Drop APIMethods200 mixin from OBPAPI5_1_0 and OBPAPI6_0_0
- Add v2_0_0 skip filter in ResourceDocsAPIMethods activeResourceDocs match
- Fix v2.0.0 case in getResourceDocsList to use OBPAPI2_0_0.allResourceDocs
- JSONFactory1_4_0Test: use OBPAPI1_4_0.allResourceDocs.head as Lift doc reference
…s300, Http4s310, Http4s400

Also fix rehydrate_resource_docs.py to recognise non-static resourceDocs blocks
(v3.0.0/v3.1.0 use plain resourceDocs += ResourceDoc, not staticResourceDocs).

v3.0.0: 47 patched
v3.1.0: 93 patched (2 already up-to-date, 7 no Lift match)
v4.0.0: 217 patched (8 already up-to-date, 34 no Lift match)

Missing imports and local vals added to restore compile:
- Http4s300: SwaggerDefinitionsJSON object + AccountsHelper._
- Http4s310: Glossary import; productAttributeGeneralInfo, accountAttributeGeneralInfo,
  generalObpConsentText, supportedConnectorNames local vals
- Http4s400: SwaggerDefinitionsJSON object, ConsentChallengeJsonV310, ConsentStatus,
  AttributeCategory, AttributeType, UserInvitationPurpose imports;
  productAttributeGeneralInfo, customerAttributeGeneralInfo,
  generalWebHookInfo, accountNotificationWebhookInfo local vals;
  Glossary._ wildcard for unqualified getGlossaryItem calls;
  PractiseEndpoint import
@hongwei1 hongwei1 changed the title Refactor/comment v220 and v200 liftweb Refactor/commented v220,v210 and v200 liftweb May 21, 2026
@hongwei1 hongwei1 closed this May 21, 2026
…and getTransactionById

getObpConnectorLoopback: change description from userAuthenticationMessage(true) to false.
The Lift handler used anonymousAccess (no auth required), but the true flag caused the
ResourceDoc constructor to add AuthenticatedUserIsRequired to errorResponseBodies ->
needsAuthentication=true -> middleware enforced 401 before the handler could return 400.

getTransactionByIdForBankAccount: change description from userAuthenticationMessage(false)
to true. The Lift handler used authenticatedAccess (auth required), but the false flag
caused the constructor to remove AuthenticatedUserIsRequired from errorResponseBodies ->
needsAuthentication=false -> validateView returned 403 instead of 401 for unauthenticated.

Also regenerate frozen_type_meta_data snapshot to reflect v2.1.0 endpoint renames from
the http4s migration (addCardsForBank->addCardForBank, answerTransactionRequestChallenge
split into type-specific variants).
@hongwei1 hongwei1 reopened this May 21, 2026
@sonarqubecloud
Copy link
Copy Markdown

@simonredfern simonredfern merged commit 03fba29 into OpenBankProject:develop May 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants