From c015c58d1c6d070f1ceef07b42715df38c56674a Mon Sep 17 00:00:00 2001 From: Yuriy Shevtsov Date: Thu, 12 Oct 2023 16:34:19 +0100 Subject: [PATCH] Fixed generation example values for date properties Fixes #418 --- .../generator/json/AspectModelJsonPayloadGenerator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/json/AspectModelJsonPayloadGenerator.java b/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/json/AspectModelJsonPayloadGenerator.java index eeb335fa2..623e6c440 100644 --- a/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/json/AspectModelJsonPayloadGenerator.java +++ b/core/esmf-aspect-model-document-generators/src/main/java/org/eclipse/esmf/aspectmodel/generator/json/AspectModelJsonPayloadGenerator.java @@ -513,6 +513,9 @@ private Optional getDateFormat( final String urn ) { if ( XSD.duration.getURI().equals( urn ) ) { return Optional.of( new SimpleDateFormat( "PddD" ) ); } + if ( XSD.date.getURI().equals( urn ) ) { + return Optional.of( new SimpleDateFormat( "yyyy-MM-dd" ) ); + } return Optional.empty(); }