-
Notifications
You must be signed in to change notification settings - Fork 459
Refactor/removed v130 #2667
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
Open
hongwei1
wants to merge
21
commits into
OpenBankProject:develop
Choose a base branch
from
hongwei1:refactor/removedV130
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor/removed v130 #2667
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
fix Github Action
- Add Http4sCallContextBuilderTest with 454 lines of test coverage - Test URL extraction including path, query parameters, and path parameters - Test header extraction and conversion to HTTPParam format - Test body extraction for POST, PUT, and GET requests - Test correlation ID generation and extraction from X-Request-ID header - Test IP address extraction from X-Forwarded-For and direct connection - Test authentication header extraction for all supported auth types - Test error handling and edge cases in CallContext building - Ensure Http4sCallContextBuilder correctly processes http4s Request[IO] objects
- Add comprehensive test suite for ResourceDocMatcher with 545 lines of test coverage - Test exact path matching for GET, POST, and multi-segment paths - Test verb and path mismatch scenarios returning None - Test BANK_ID variable matching and parameter extraction - Test BANK_ID + ACCOUNT_ID variable matching and extraction - Test BANK_ID + ACCOUNT_ID + VIEW_ID variable matching and extraction - Test COUNTERPARTY_ID variable matching and extraction - Test non-matching request scenarios - Ensure ResourceDocMatcher correctly identifies and extracts path parameters for all variable types - Use FeatureSpec with Given-When-Then style for clear test documentation
…and improve validation DSL - Ensure all responses (errors and successful) have JSON Content-Type - Replace repeated EitherT patterns with a clean Validation DSL (success/failure) - Add ValidationContext to accumulate user, bank, account, view, and counterparty entities - Add detailed comments for authentication, authorization, and entity validation steps - Simplify middleware logic while preserving original validation order and behavior
This reverts commit 3a264ed.
- Safely extract request headers using `S.request.map(...).openOr(Nil)` instead of `openOrThrowException` - Add proper error handling for resource-docs endpoint using `ErrorResponseConverter` - Extract query parameters directly from URI instead of parsing URL string - Add comprehensive test suite for Http4s700 routes
Move role-based authorization for resource-docs endpoint from endpoint implementation to ResourceDocMiddleware. This ensures consistent authentication handling across all endpoints and removes duplicate authorization logic. The middleware now checks the `resource_docs_requires_role` property and enforces the `canReadResourceDoc` role when enabled. Tests are updated to verify proper 403 responses with missing role messages.
The previous branch pattern excluded some branches unintentionally. Adding '**' ensures all branches are matched except 'develop'.
- Fix CardTest by using proper ReplacementJSON instead of null for replacement field - Uncomment and enable CreateCreditCardTest which was previously commented out - Ensure both test suites properly validate card creation and replacement scenarios
|
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.