-
Notifications
You must be signed in to change notification settings - Fork 459
Feature/add b gv2 #2683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
simonredfern
merged 13 commits into
OpenBankProject:develop
from
hongwei1:feature/addBGv2
Feb 9, 2026
Merged
Feature/add b gv2 #2683
simonredfern
merged 13 commits into
OpenBankProject:develop
from
hongwei1:feature/addBGv2
Feb 9, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add POST /system-views endpoint to create system views with validation for public flag and view name format - Add GET /system-views/VIEW_ID endpoint to retrieve system view details - Add PUT /system-views/VIEW_ID endpoint to update existing system views with immutable name field - Add DELETE /system-views/VIEW_ID endpoint to delete system views - Import required dependencies: ViewNewStyle, ApiRole, CreateViewJsonV500, UpdateViewJsonV500, JSONFactory500, and ViewId - Add resource documentation for all four endpoints with proper authentication and error handling - Implement entitlement checks for canCreateSystemView, canGetSystemView, canUpdateSystemView, and canDeleteSystemView - Enforce system view constraints: cannot be public, must have valid system view name format
- Add comprehensive HTTP4S v5.0.0 system views integration test suite
- Implement test cases for POST /system-views endpoint with authentication and authorization validation
- Implement test cases for GET /system-views/{VIEW_ID} endpoint with role-based access control
- Implement test cases for PUT /system-views/{VIEW_ID} endpoint for updating system views
- Implement test cases for DELETE /system-views/{VIEW_ID} endpoint for removing system views
- Add helper method makeHttpRequest for executing HTTP requests through Http4sTestServer
- Add helper method toFieldMap for converting JSON field lists to maps for easier assertion
- Validate 401 Unauthorized responses for unauthenticated requests
- Validate 403 Forbidden responses for requests lacking required roles (CanCreateSystemView, CanGetSystemView, CanUpdateSystemView, CanDeleteSystemView)
- Validate 201 Created responses with proper view details on successful creation
- Validate 200 OK responses with view data on successful retrieval and updates
- Validate 204 No Content responses on successful deletion
- Validate 404 Not Found responses for non-existent system views
- Use network-based Http4sTestServer for full integration testing through real HTTP requests
- Follow established test patterns from Http4s500RoutesTest and Http4sLiftBridgeParityTest
…pers - Move executeFuture and executeFutureCreated methods to EndpointHelpers for reusability - Remove duplicate okJson helper and local executeFuture from Http4s500 - Update all system view endpoints to use EndpointHelpers.executeFuture and executeFutureCreated - Simplify createSystemView and updateSystemView by using httpBody from CallContext instead of req.as[String] - Remove unnecessary IORuntime imports from endpoint implementations - Improve test data generation by shortening view IDs to avoid length constraints - Centralizes Future-based business logic execution with consistent error handling across endpoints
- Extract JSON serialization logic to private toJsonOk helper method - Add error handling with attempt/flatMap pattern to all endpoint helpers - Integrate ErrorResponseConverter for consistent error response formatting - Update executeAndRespond to catch and convert Future exceptions - Update withUser to handle validation and conversion errors - Update withBank to handle validation and conversion errors - Update withUserAndBank to handle validation and conversion errors - Update executeFuture to use extracted toJsonOk helper - Simplify documentation to focus on error handling behavior - Reduce code duplication across all helper methods
…dpoints
- Add Http4sBGv2.scala with route aggregation and resource doc middleware
- Implement Http4sBGv2AIS.scala with Account Information Service endpoints
* GET /v2/accounts - read account list
* GET /v2/accounts/{account-id} - read account details
* GET /v2/accounts/{account-id}/balances - read account balances
* GET /v2/accounts/{account-id}/transactions - read transaction list
* GET /v2/accounts/{account-id}/transactions/{transactionId} - read transaction details
* GET /v2/card-accounts - read card account list
* GET /v2/card-accounts/{account-id} - read card account details
* GET /v2/card-accounts/{account-id}/balances - read card account balances
* GET /v2/card-accounts/{account-id}/transactions - read card account transactions
- Implement Http4sBGv2PIS.scala with Payment Initiation Service endpoints
- Implement Http4sBGv2PIIS.scala with Payment Initiation Information Service endpoints
- Add JSONFactory_BERLIN_GROUP_v2.scala with mock data factories
- Add comprehensive integration tests for AIS, PIS, and PIIS endpoints
- Add resource documentation tests for API endpoint validation
- Add JSON factory unit tests for data serialization
…tion - Add berlinGroupVersion2 constant to ConstantsBG for API version tracking - Register Http4sBGv2 routes in Http4sApp baseServices routing chain - Replace maven-assembly-plugin with maven-shade-plugin for improved fat JAR creation - Configure shade plugin with manifest transformer and reference.conf appending - Add filters to exclude signature files from shaded JAR to prevent conflicts - Enables Berlin Group v2 API endpoints to be served alongside v5.0.0 and v7.0.0
… resource docs - Remove `/v2` prefix from all Berlin Group v2 API endpoint paths in AIS, PIS, and PIIS implementations - Integrate Berlin Group v2 resource documentation into ResourceDocsAPIMethods - Add Berlin Group v2 version handling in resource docs retrieval logic - Add Berlin Group v2 version handling in version routes matching - Add Berlin Group v2 version handling in active resource docs filtering - Normalize endpoint paths to follow consistent routing pattern where version is handled at application level, not in individual endpoint definitions
…d files - Add obp-http4s-runner/dependency-reduced-pom.xml to .gitignore - Prevent Maven shade plugin artifacts from being tracked in version control - Maintain clean repository state by excluding generated build artifacts
…ification - Reorder apiTag lists in Http4sBGv2AIS to place apiTagPSD2AIS before apiTagBerlinGroupM - Reorder apiTag lists in Http4sBGv2PIIS to place apiTagPSD2PIIS before apiTagBerlinGroupM - Reorder apiTag lists in Http4sBGv2PIS to place apiTagPSD2PIS before apiTagBerlinGroupM - Ensures consistent tag ordering across all Berlin Group v2 API implementations - Prioritizes PSD2 classification tags for better API documentation and categorization
… feature/addHttp4sV500CURD
…n tests - Import ConstantsBG to access centralized API version configuration - Add prefix variable using berlinGroupVersion2 urlPrefix and apiShortVersion - Update all test descriptions to use dynamic prefix instead of hardcoded paths - Replace hardcoded "/v2/" paths with parameterized prefix in AIS test endpoints - Replace hardcoded "/v2/" paths with parameterized prefix in PIIS test endpoints - Replace hardcoded "/v2/" paths with parameterized prefix in PIS test endpoints - Ensures tests remain synchronized with API configuration changes and improves maintainability
…I version - Update ApiVersionUtilsTest to expect 26 API versions instead of 25 - Reflects addition of new API version to the system - Ensures version count validation remains accurate with latest changes
…00CURD # Conflicts: # obp-api/src/main/scala/code/api/util/http4s/Http4sSupport.scala
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



No description provided.