[ofbiz-framework] branch trunk updated: Fixed: Issue in OpenAPI generation due to duplicate ModelParam in the IN model param list. Added a BinaryOperarion function to account for duplicates(OFBIZ-11328)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Fixed: Issue in OpenAPI generation due to duplicate ModelParam in the IN model param list. Added a BinaryOperarion function to account for duplicates(OFBIZ-11328)

grv-2
This is an automated email from the ASF dual-hosted git repository.

grv pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 31a6171  Fixed: Issue in OpenAPI generation due to duplicate ModelParam in the IN model param list. Added a BinaryOperarion function to account for duplicates(OFBIZ-11328)
31a6171 is described below

commit 31a6171c0b5671d56c6f197850dfc2da0db3af58
Author: Girish Vasmatkar <[hidden email]>
AuthorDate: Fri Sep 18 16:26:18 2020 +0530

    Fixed: Issue in OpenAPI generation due to duplicate ModelParam in the IN model param list. Added a BinaryOperarion function
    to account for duplicates(OFBIZ-11328)
---
 .../service/src/main/java/org/apache/ofbiz/service/ModelService.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
index 58e3377..2df5f72 100644
--- a/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
+++ b/framework/service/src/main/java/org/apache/ofbiz/service/ModelService.java
@@ -1042,7 +1042,7 @@ public class ModelService extends AbstractMap<String, Object> implements Seriali
     public Map<String, String> getInParamNamesMap() {
         // TODO : Does not yet support getting nested parameters
         return getInModelParamList().stream().filter(param -> !param.getInternal())
-                .collect(Collectors.toMap(ModelParam::getName, param -> param.getType()));
+                .collect(Collectors.toMap(ModelParam::getName, param -> param.getType(), (existingValue, newValue) -> newValue));
     }
 
     /**
@@ -1053,7 +1053,7 @@ public class ModelService extends AbstractMap<String, Object> implements Seriali
     public Map<String, String> getOutParamNamesMap() {
         // TODO : Does not yet support getting nested parameters
         return getModelParamList().stream().filter(param -> param.isOut() && !param.getInternal())
-                .collect(Collectors.toMap(ModelParam::getName, param -> param.getType()));
+                .collect(Collectors.toMap(ModelParam::getName, param -> param.getType(), (existingValue, newValue) -> newValue));
     }
 
     /**