This repository was archived by the owner on Dec 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/resources/kotlin/src/main/kotlin/packagename/schemas Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,16 @@ class DoubleJsonSchema {
2222
2323 class DoubleJsonSchema1 private constructor() : JsonSchema<DoubleJsonSchema1Boxed >(
2424 JsonSchemaInfo()
25+ {{ #if generatorSettings.intsAllowedForFloatDoubleFormats }}
26+ .type(setOf(
27+ Integer::class.java,
28+ Long::class.java,
29+ Float::class.java,
30+ Double::class.java
31+ ))
32+ {{ else }}
2533 .type(setOf(Double::class.java))
34+ {{ /if }}
2635 .format("double")
2736 ), NumberSchemaValidator<DoubleJsonSchema1BoxedNumber > {
2837 @Throws(ValidationException::class)
Original file line number Diff line number Diff line change @@ -22,7 +22,14 @@ class FloatJsonSchema {
2222
2323 class FloatJsonSchema1 private constructor() : JsonSchema<FloatJsonSchema1Boxed >(
2424 JsonSchemaInfo()
25+ {{ #if generatorSettings.intsAllowedForFloatDoubleFormats }}
26+ .type(setOf(
27+ Integer::class.java,
28+ Float::class.java
29+ ))
30+ {{ else }}
2531 .type(setOf(Float::class.java))
32+ {{ /if }}
2633 .format("float")
2734 ), NumberSchemaValidator<FloatJsonSchema1BoxedNumber > {
2835 @Throws(ValidationException::class)
You can’t perform that action at this time.
0 commit comments