Skip to content

Commit 46cac3a

Browse files
committed
Return content property in NumberAssertion error message
1 parent b1714aa commit 46cac3a

File tree

1 file changed

+1
-2
lines changed
  • json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/schema/internal/factories/number/util

1 file changed

+1
-2
lines changed

json-schema-validator/src/commonMain/kotlin/io/github/optimumcode/json/schema/internal/factories/number/util/NumberUtil.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import io.github.optimumcode.json.schema.internal.AssertionContext
77
import io.github.optimumcode.json.schema.internal.JsonSchemaAssertion
88
import io.github.optimumcode.json.schema.model.AbstractElement
99
import io.github.optimumcode.json.schema.model.PrimitiveElement
10-
import io.github.optimumcode.json.schema.model.contentOrNull
1110

1211
internal operator fun Number.compareTo(maxValue: Number): Int =
1312
when (this) {
@@ -63,7 +62,7 @@ internal class NumberComparisonAssertion(
6362
ValidationError(
6463
schemaPath = path,
6564
objectPath = context.objectPath,
66-
message = "${element.contentOrNull} $errorMessage $boundaryContent",
65+
message = "${element.content} $errorMessage $boundaryContent",
6766
),
6867
)
6968
false

0 commit comments

Comments
 (0)