Skip to content

Wire 9 UK Open Banking v4.0.1 AIS/consent endpoints to real data#2864

Closed
hongwei1 wants to merge 1 commit into
OpenBankProject:developfrom
hongwei1:feature/uk401-aisp-real-data
Closed

Wire 9 UK Open Banking v4.0.1 AIS/consent endpoints to real data#2864
hongwei1 wants to merge 1 commit into
OpenBankProject:developfrom
hongwei1:feature/uk401-aisp-real-data

Conversation

@hongwei1

Copy link
Copy Markdown
Contributor

Summary

  • Replace static spec-example responses with real OBP connector data for the 9 UK Open Banking v4.0.1 AccountInfo endpoints that have real implementations in v3.1: the full account-access-consents lifecycle (create/get/delete) plus accounts, balances, and transactions (single-account and bulk).
  • Connector call sequences are carried over as-is from the v3.1 handlers (Http4sUKOBv310AccountAccess/Accounts/Balances/Transactions); a new JSONFactory_UKOpenBanking_401 shapes the results into the v4.0.1 response schema, which changed from v3.1 (AccountTypeCode replaces AccountType, single-string SchemeName, added TotalValue/TransactionMutability/status codes, etc.).
  • These are the same 5 endpoints OBP-Hola (the only real UK client) calls, plus the 4 remaining endpoints needed for a complete consent lifecycle.
  • The other 80 v4.0.1 endpoints (no v3.1 reference implementation exists) are untouched and remain spec-example stubs.

Test plan

  • mvn install -pl .,obp-commons -am -DskipTests + mvn test-compile -pl obp-api -am on JDK 25 — compiles clean
  • UKOpenBankingV401AccountInfoTests (new full scenario matrix: unauthenticated → 401, real seeded data → 200/201/204, unknown consent/account paths, full consent create → get → delete → get lifecycle) — all green
  • Full code.api.UKOpenBanking package (v3.1 + v4.0.1, 315 tests) — all green, confirms the v3.1 reference implementations are untouched
  • getAccounts / getAccountsAccountIdBalances / getAccountsAccountIdTransactions call checkUKConsent, which requires a live Hydra OAuth2 introspection endpoint with no local test double — these three keep the same authenticated -> not 401 assertion already used for their v3.1 counterparts (see UKOpenBankingV310AisTests)

Replace static spec-example responses with real OBP connector calls for
the account-access-consents, accounts, balances, and transactions
endpoints in UK Open Banking v4.0.1 AccountInfo — the same 9 endpoints
that carry real implementations in v3.1, covering the full consent
lifecycle plus the 5 endpoints OBP-Hola actually calls.

Connector call sequences are carried over from the v3.1 handlers
(Http4sUKOBv310AccountAccess/Accounts/Balances/Transactions) since the
underlying data access is unchanged between API versions. Response
shaping needed a new factory (JSONFactory_UKOpenBanking_401) because the
v4.0.1 Account/Balance/Transaction resources changed shape from v3.1
(AccountTypeCode replaces AccountType, single-string SchemeName, added
TotalValue/TransactionMutability/Status codes, etc.).

getAccounts, getAccountsAccountIdBalances and getAccountsAccountIdTransactions
call checkUKConsent, which requires a live Hydra OAuth2 introspection
endpoint with no local test double, so those three keep the same
"authenticated -> not 401" assertion already used for their v3.1
counterparts. The other 6 endpoints get full scenario coverage: real
seeded data, unknown-consent and empty-data paths, and a full
create -> get -> delete -> get consent lifecycle.
@sonarqubecloud

Copy link
Copy Markdown

@hongwei1 hongwei1 closed this Jul 14, 2026
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.

1 participant