[ofbiz-plugins] branch trunk updated: Improved: Added missing OpenApi mapping for Boolean and Java Collection types(OFBIZ-11328)

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

[ofbiz-plugins] branch trunk updated: Improved: Added missing OpenApi mapping for Boolean and Java Collection types(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-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new ad4bb6e  Improved: Added missing OpenApi mapping for Boolean and Java Collection types(OFBIZ-11328)
ad4bb6e is described below

commit ad4bb6ec861bb64221d43149394b70c97907e795
Author: Girish Vasmatkar <[hidden email]>
AuthorDate: Fri Aug 21 15:44:03 2020 +0530

    Improved: Added missing OpenApi mapping for Boolean and Java Collection types(OFBIZ-11328)
---
 .../src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
index 0920109..0856581 100644
--- a/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
+++ b/ofbiz-rest-impl/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import io.swagger.v3.oas.models.media.ArraySchema;
+import io.swagger.v3.oas.models.media.BooleanSchema;
 import io.swagger.v3.oas.models.media.DateSchema;
 import io.swagger.v3.oas.models.media.IntegerSchema;
 import io.swagger.v3.oas.models.media.MapSchema;
@@ -82,12 +83,15 @@ public final class OpenApiUtil {
         JAVA_OPEN_API_MAP.put("String", StringSchema.class);
         JAVA_OPEN_API_MAP.put("Integer", IntegerSchema.class);
         JAVA_OPEN_API_MAP.put("Long", IntegerSchema.class);
+        JAVA_OPEN_API_MAP.put("Boolean", BooleanSchema.class);
         JAVA_OPEN_API_MAP.put("Map", MapSchema.class);
         JAVA_OPEN_API_MAP.put("GenericEntity", MapSchema.class);
         JAVA_OPEN_API_MAP.put("GenericPK", MapSchema.class);
         JAVA_OPEN_API_MAP.put("GenericValue", MapSchema.class);
         JAVA_OPEN_API_MAP.put("HashMap", MapSchema.class);
         JAVA_OPEN_API_MAP.put("List", ArraySchema.class);
+        JAVA_OPEN_API_MAP.put("Set", ArraySchema.class);
+        JAVA_OPEN_API_MAP.put("Collection", ArraySchema.class);
         JAVA_OPEN_API_MAP.put("Float", NumberSchema.class);
         JAVA_OPEN_API_MAP.put("Double", NumberSchema.class);
         JAVA_OPEN_API_MAP.put("BigDecimal", NumberSchema.class);