-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
FINERACT-1926: Asset Externalization on Fineract #3350
FINERACT-1926: Asset Externalization on Fineract #3350
Conversation
@josehernandezfintecheandomx Please add proper FINERACT story number into the PR title and please amend your commit as well as that one should contain the relevant FINERACT story number as well! |
.../main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApiResource.java
Outdated
Show resolved
Hide resolved
...tor/src/main/java/org/apache/fineract/investor/domain/search/SearchedExternalAssetOwner.java
Show resolved
Hide resolved
...c/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java
Show resolved
Hide resolved
...c/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java
Outdated
Show resolved
Hide resolved
...in/java/org/apache/fineract/investor/service/search/domain/ExternalAssetOwnerSearchData.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments, questions!
Also please cover this functionality with tests!
c8f232b
to
128e883
Compare
@josehernandezfintecheandomx please fix the compilation errors!
|
...a/org/apache/fineract/investor/service/search/mapper/ExternalAssetOwnerSearchDataMapper.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments!
109a516
to
c252496
Compare
@josehernandezfintecheandomx Please add FINERACT-XXXX story number into the PR and into the commit! |
2bcbc60
to
056df58
Compare
056df58
to
aa3179b
Compare
public String text; | ||
} | ||
|
||
@Schema(description = "GetSearchExternalAssetOwnerTransferResponse") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We dont need this. Swagger can automatically generate this. See ExternalAssetOwnersApiResource.getTransfers
@@ -152,4 +152,57 @@ static final class ExternalAssetOwnerTransferChangesData { | |||
public String purchasePriceRatio; | |||
} | |||
} | |||
|
|||
@Schema(description = "GetExternalAssetOwnerSearchRequest") | |||
public static final class GetExternalAssetOwnerSearchRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used. not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! removed
|
||
@Schema(example = "[2023, 5, 1]") | ||
public LocalDate effectiveFrom; | ||
@Schema(description = "ExternalTransferResponse") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might wanna revert this rearrangement changes.
private void validateTextSearchRequest(PagedRequest<ExternalAssetOwnerSearchRequest> searchRequest) { | ||
Objects.requireNonNull(searchRequest, "searchRequest must not be null"); | ||
|
||
platformUserRightsContext.isAuthenticated(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this authentication check to API layer!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOne, !t was moved to the API layer
...eract/integrationtests/investor/externalassetowner/SearchExternalAssetOwnerTransferTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments!
b88555c
to
19ee736
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@@ -152,4 +152,57 @@ static final class ExternalAssetOwnerTransferChangesData { | |||
public String purchasePriceRatio; | |||
} | |||
} | |||
|
|||
@Schema(description = "GetExternalAssetOwnerSearchRequest") | |||
public static final class GetExternalAssetOwnerSearchRequest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! removed
@josehernandezfintecheandomx Please let me know when all the comments are replied / resolved. Thanks! ;) |
843c09d
to
bfea74d
Compare
bfea74d
to
ce985b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
HttpMessageNotReadableErrorController is okay, however i reckon we need an erorr handler to handle DateTimeParseException and provide back a valid error message with a hint about the problem. Something like this:
HTTP 400 - Bad request
Error message: Invalid date was provided. The date must match with the “yyyy-MMMM-dd” date format.
Can you please write an ErrorMapper for the DateTimeParseException? -
ExternalAssetOwnersApiResourceSwagger.java -> Please undo the changes, they are not required. , Spring will generate automatically the swagger
-
ExternalAssetOwnersApiResource.java -> searchInvestorData method @ApiResponses annotation can be removed as well
-
Please enhance your tests cases:
- assertNotNull(response); is not enough… Please write assertion for each value and check the value is matching with the expectations
- Test case when submitted on from date of search request date format is invalid -> I dont see this test case to be covered!
ce985b2
to
0d3e583
Compare
Done those changes and PR updated please review it, Thanls |
83fa506
to
1d44def
Compare
1d44def
to
ac93d33
Compare
import org.junit.jupiter.api.BeforeAll; | ||
|
||
@Slf4j | ||
public class ExternalAssetOwnerTransferTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class have 0 tests...
Probably the class name is not the best...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
API for Asset Externalization Feature, in order to analyze and work on the asset external owner details, I need to be able to view filer and search the AEO
FINERACT-1926
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Write the commit message as per https://github.com/apache/fineract/#pull-requests
Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
Create/update unit or integration tests for verifying the changes made.
Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.