You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by "VictorPavfurious (via GitHub)" <gi...@apache.org> on 2025/04/03 17:39:55 UTC

[PR] FINERACT-2169: Refactor account api controller; [fineract]

VictorPavfurious opened a new pull request, #4541:
URL: https://github.com/apache/fineract/pull/4541

   ## Description
   
   1) Implement serialize for LocalDate
   2) Replace String res/req to DTO;
   3) Minor rename value in test;
   
   ## 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2033394794


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   I think we don't any chances.. So, we should rewrite method to array dates for in order to have 100% compatibility with client as (mobiles, web app and etc). And yes... it's seems like weird, but we can't refactor client side, so we should do it in our backend..



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2031979791


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   @adamsaghy 
   Hmm, sorry, I overlooked it... But, about LocalDateJsonConverter and LocalDateTypeAdapter, it seems like not duplicate, there working with different serializetion libraries.  LocalDateJsonConverter - is working with Jackson and convert to json LocalDate to format String yyyy-MM-dd, but we are using format array numbers [yyyy, m, d], so this class broke logic... LocalDate should convert to array format, not for String because our client use it format and integration tests too... So, i have few questions: 
   1) Why do we convert LocalDate to String format, when client and tests expecting array numbers ?
   2) Should rewrite method convertToJson in class LocalDateJsonConverter to format array number?
   
   Second class as LocalDateTypeAdapter - is working with GSON serialize and convert to format yyyy-MM-dd. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2058140545


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountRequest.java:
##########
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.accounts.data.request;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class AccountRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private String unitPrice;

Review Comment:
   yes, you are right!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2055483021


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountChargesRequest.java:
##########
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.accounts.data.request;
+
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class AccountChargesRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private Long chargeId;
+    private Long amount;

Review Comment:
   this should be BigDecimal... amount can be not whole number, like 3.5, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2031355830


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   `org.apache.fineract.infrastructure.core.jersey.converter.LocalDateJsonConverter` duplicate?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2055850748


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountChargesRequest.java:
##########
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.accounts.data.request;
+
+import java.io.Serial;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class AccountChargesRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private Long chargeId;
+    private Long amount;

Review Comment:
   yes, you are right, i have missed it...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on PR #4541:
URL: https://github.com/apache/fineract/pull/4541#issuecomment-2796384875

   @VictorPavfurious Please rebase your PR. Also please take a look on this PR: https://github.com/apache/fineract/pull/4556 
   Arnold was adding / reworking LocalDateJsonConverter


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2031979791


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   @adamsaghy 
   Hmm, sorry, I overlooked it... But, about LocalDateJsonConverter and LocalDateTypeAdapter, it seems like not duplicate, there working with different serializetion libraries.  LocalDateJsonConverter - is working with Jackson and convert to json LocalDate to format String yyyy-MM-dd, but we are using format array numbers [yyyy, m, d], so this class broke logic... LocalDate should convert to array format, not for String because our client use it format and integration tests too... So, i have few questions: 
   1) Why do we convert LocalDate to String format, when client and tests expecting array numbers ?
   2) Should rewrite method convertToJson in class LocalDateJsonConverter to format array number?
   
   My suggestion - we must have 100% compatibility with GSON serialization, (unfortunately), but we must use format as [yyyy, m, d]. So, need to rewrite method convertToJson in class LocalDateJsonConverter to correct format.
   
   Second class as LocalDateTypeAdapter - is working with GSON serialize and convert to format yyyy-MM-dd. I think that class will deprcated soon. 



##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   @vidakovic  could you help with above questions and suggestions ? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on PR #4541:
URL: https://github.com/apache/fineract/pull/4541#issuecomment-2803865100

   After merge this PR https://github.com/apache/fineract/pull/4583, this will be ready to merge, otherwise we'll have failed tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on PR #4541:
URL: https://github.com/apache/fineract/pull/4541#issuecomment-2796126381

   @adamsaghy 
   I have changed exists LocalDate converter - covert LocalDate in format [yyyy, m, d] for 100% compatibility and added custom serializetion for wrote DTO's with tests which are using format like String yyyy-mm-dd. This is PR ready for review.
   
   In the default behavior jackson will be serialize LocalDate to [yyyy, m, d], if we don't use custom JsonSerialze under fields.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2033357741


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   I was never a big fan of array dates... but yeah, we have this legacy behaviour... what to do, what to do... i wonder...



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2057988139


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountRequest.java:
##########
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.portfolio.accounts.data.request;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.List;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class AccountRequest implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    private String unitPrice;

Review Comment:
   unitPrice should be BigDecimal, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy merged PR #4541:
URL: https://github.com/apache/fineract/pull/4541


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "adamsaghy (via GitHub)" <gi...@apache.org>.
adamsaghy commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2031355830


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   `org.apache.fineract.infrastructure.core.jersey.converter.LocalDateJsonConverter` and `org.apache.fineract.client.util.JSON.LocalDateTypeAdapter` 
   duplicate? we already have serializers for this. Do we need an another? :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on code in PR #4541:
URL: https://github.com/apache/fineract/pull/4541#discussion_r2031979791


##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/serialization/LocalDateArraySerializer.java:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.infrastructure.serialization;
+
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import java.io.IOException;
+import java.time.LocalDate;
+
+/**
+ * Custom serialization for covert LocalDate in format array numbers [yyyy, m, d]
+ */
+
+public class LocalDateArraySerializer extends JsonSerializer<LocalDate> {

Review Comment:
   @adamsaghy 
   Hmm, sorry, I overlooked it... But, about LocalDateJsonConverter and LocalDateTypeAdapter, it seems like not duplicate, there working with different serializetion libraries.  LocalDateJsonConverter - is working with Jackson and convert to json LocalDate to format String yyyy-MM-dd, but that is strange for me, because like i know, jackson in under hood serialize LocalDate like String yyyy-MM-dd, so it's useless class converter... Second class as LocalDateTypeAdapter - is working with GSON serialize and convert to format yyyy-MM-dd. 
   In my case, we should convert LocalDate to array number, but Jackson by default doesn't do it, so I have created this serialization.
   I think, on this case i should rewrite exists method "convertToJson" in class LocalDateJsonConverter to correct format data as array number and it'll work nice. And of course, i going to remove my custom serialization. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] FINERACT-2169: Refactor account api controller; [fineract]

Posted by "VictorPavfurious (via GitHub)" <gi...@apache.org>.
VictorPavfurious commented on PR #4541:
URL: https://github.com/apache/fineract/pull/4541#issuecomment-2815087031

   Ok, i have rebased from dev, please restart checks @adamsaghy 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org