Commit 0281423
committed
feat(v4.0.0): migrate final 43 endpoints — v4 100% on http4s (258/258)
Batches 13–19 in Http4s400.scala add the last 43 v4.0.0 endpoints to http4s:
- 4 endpoint mappings (system + bank level)
- 4 endpoint tags (system + bank level)
- 6 schema / authentication-type / connector-method endpoints
- 10 dynamic-resource-doc CRUD (system + bank level)
- 10 dynamic-message-doc CRUD (system + bank level)
- 1 buildDynamicEndpointTemplate
- 8 complex authn (addAccount, createConsumer, createCounterpartyForAnyAccount,
createHistoricalTransactionAtBank, createSettlementAccount, createUserInvitation,
createUserWithAccountAccess, createUserWithRoles)
Post-batch fixes:
- updateEndpointMapping / updateBankLevelEndpointMapping / updateSystemLevelEndpointTag
/ updateBankLevelEndpointTag: switched to `executeFutureCreated` so they return 201
(the Lift handlers all use HttpCode.`201` even on PUT)
- createUserWithRoles / createUserWithAccountAccess: switched to `executeFutureCreated`
for the same 201-not-200 reason
- 8 transaction-request-type alias ResourceDoc URL placeholders:
VIEW_ID → GRANT_VIEW_ID so the matcher skips view validation, mirroring the original
`createTransactionRequest` doc's behaviour and unblocking
MakerCheckerTransactionRequestTest's multi-challenge scenario
- DYNAMIC-RESOURCE-DOC-ID placeholder renamed to DYNAMIC_RESOURCE_DOC_ID:
`isTemplateVariable` requires `[A-Z_0-9]` only; hyphens broke template recognition
causing 500 instead of 403 for unauthorized requests
- deleteExplicitCounterparty: COUNTERPARTY_ID → COUNTERPARTY_ID_PARAM to bypass
middleware's counterparty lookup (400 not 404 for missing counterparty)
- updateBankAttribute: added missing canUpdateBankAttribute role to the doc
ErrorMessages.getCodeByOBPPrefix:
- New helper to look up the canonical HTTP status code from an OBP-prefixed error
message that may have a runtime suffix appended (e.g. "OBP-20020: User does not
have access to the view. Current ViewId is owner")
- Restricted to 401/403/408/429 only; non-auth canonical codes (e.g. BankNotFound's
404) are NOT remapped — callers that want a non-400 must set failCode explicitly,
matching Lift's `errorJsonResponse` semantics
Docs:
- CLAUDE.md: v4.0.0 added to the "fully on http4s" row in the per-version
completeness table
- LIFT_HTTP4S_MIGRATION.md: v4.0.0 row updated to "done — 258/258 (100%)"; the
bulk-port item in the suggested ordering struck through
v4 test suite: 494 / 495 pass. The one remaining failure
(ApiCollectionEndpointTest BGv1.3-getConsentStatus) is pre-existing —
also fails on commit 5895ecf before any of this work.1 parent f7e551a commit 0281423
4 files changed
Lines changed: 1949 additions & 45 deletions
File tree
- obp-api/src/main/scala/code/api
- util
- v4_0_0
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
346 | | - | |
| 345 | + | |
347 | 346 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
353 | 352 | | |
354 | | - | |
355 | | - | |
| 353 | + | |
| 354 | + | |
356 | 355 | | |
357 | | - | |
358 | | - | |
| 356 | + | |
359 | 357 | | |
360 | | - | |
361 | | - | |
| 358 | + | |
| 359 | + | |
362 | 360 | | |
363 | 361 | | |
364 | 362 | | |
| |||
0 commit comments