From 93ac8f229424870b4ec6b2cfde64ea69b96c05d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Zi=C3=B6rjen?= Date: Wed, 8 May 2024 16:31:18 +0200 Subject: [PATCH] Add format mapping for double, float and ignore unknown formats --- src/main/java/org/swisspush/jsons2xsd/Jsons2XsdMojo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/swisspush/jsons2xsd/Jsons2XsdMojo.java b/src/main/java/org/swisspush/jsons2xsd/Jsons2XsdMojo.java index f728958..4ed3eac 100644 --- a/src/main/java/org/swisspush/jsons2xsd/Jsons2XsdMojo.java +++ b/src/main/java/org/swisspush/jsons2xsd/Jsons2XsdMojo.java @@ -92,6 +92,9 @@ private void generate(File input, File output) throws IOException { .customTypeMapping(JsonSimpleType.INTEGER, "long", XsdSimpleType.LONG) .customTypeMapping(JsonSimpleType.INTEGER, "int64", XsdSimpleType.LONG) .customTypeMapping(JsonSimpleType.STRING, "uuid", XsdSimpleType.STRING) + .customTypeMapping(JsonSimpleType.NUMBER, "double", XsdSimpleType.DECIMAL) + .customTypeMapping(JsonSimpleType.NUMBER, "float", XsdSimpleType.DECIMAL) + .ignoreUnknownFormats(true) .validateXsdSchema(false); if(useGenericItemNames) {