From 391ee58707455f9423e4dc8975f2bdeec909d17e Mon Sep 17 00:00:00 2001 From: Aleksandr Dubinsky Date: Sun, 31 Oct 2021 20:11:22 +0200 Subject: [PATCH] [fix] @JsonProperty(defaultValue="...") does not allow float/double values #152 --- .../com/kjetland/jackson/jsonSchema/JsonSchemaGenerator.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/kjetland/jackson/jsonSchema/JsonSchemaGenerator.scala b/src/main/scala/com/kjetland/jackson/jsonSchema/JsonSchemaGenerator.scala index 17e2258..3a72071 100755 --- a/src/main/scala/com/kjetland/jackson/jsonSchema/JsonSchemaGenerator.scala +++ b/src/main/scala/com/kjetland/jackson/jsonSchema/JsonSchemaGenerator.scala @@ -700,7 +700,7 @@ class JsonSchemaGenerator } extractDefaultValue(p).map { value => - node.put("default", value.toInt) + node.put("default", value.toDouble) } // Look for @JsonSchemaExamples