com.github.erosb.jsonsKema.MultipleOf.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-sKema Show documentation
Show all versions of json-sKema Show documentation
JSON Schema Parser and Validator
package com.github.erosb.jsonsKema
data class MultipleOfSchema(val denominator: Number, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitMultipleOfSchema(this)
}
internal val multipleOfLoader: KeywordLoader = { ctx ->
MultipleOfSchema(ctx.keywordValue.requireNumber().value, ctx.location)
}
data class MultipleOfValidationFailure(
override val schema: MultipleOfSchema,
override val instance: IJsonNumber
) : ValidationFailure("${instance.value} is not a multiple of ${schema.denominator}", schema, instance, Keyword.MULTIPLE_OF)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy