You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@johnzon.apache.org by rm...@apache.org on 2022/08/08 14:12:46 UTC
[johnzon] 01/02: adding int64 and int32 format support
This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/johnzon.git
commit 2dfde39e5421a3719d0a90f76f92d92df6d415ef
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Mon Aug 8 15:10:48 2022 +0200
adding int64 and int32 format support
---
.../java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java b/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java
index 7c3a9a63..7625a2fb 100644
--- a/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java
+++ b/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java
@@ -258,8 +258,10 @@ public class PojoGenerator {
return required ? "double" : "Double";
// openapi types
case "int":
+ case "int32":
case "integer":
return required ? "int" : "Integer";
+ case "int64":
case "long":
return required ? "long" : "Long";
case "float":
@@ -383,9 +385,11 @@ public class PojoGenerator {
imports.add(Map.class.getName());
return "Map<String, Double>";
case "int":
+ case "int32":
case "integer":
imports.add(Map.class.getName());
return "Map<String, Integer>";
+ case "int64":
case "long":
imports.add(Map.class.getName());
return "Map<String, Long>";
@@ -492,8 +496,10 @@ public class PojoGenerator {
case "double":
return "Double";
case "int":
+ case "int32":
case "integer":
return "Integer";
+ case "int64":
case "long":
return "Long";
case "float":