Skip to content

Commit

Permalink
Merge pull request #7 from swisspost/develop
Browse files Browse the repository at this point in the history
Add format mapping for double, float and ignore unknown formats
  • Loading branch information
schaermu authored May 21, 2024
2 parents 8fae0c8 + ebee638 commit d25c011
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>org.swisspush.maven.plugins</groupId>
<artifactId>jsons2xsd-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<version>1.0.3-SNAPSHOT</version>
<version>1.0.4-SNAPSHOT</version>
<name>jsons2xsd Maven Mojo</name>
<description>jsons2xsd Maven Mojo</description>
<url>https://github.com/swisspush/jsons2xsd-maven-plugin</url>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/swisspush/jsons2xsd/Jsons2XsdMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d25c011

Please sign in to comment.