com.github.erosb.jsonsKema.Maximum.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 MaximumSchema(val maximum: Number, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitMaximumSchema(this)
}
internal val maximumLoader: KeywordLoader = { ctx ->
MaximumSchema(ctx.keywordValue.requireNumber().value, ctx.location)
}
data class MaximumValidationFailure(
override val schema: MaximumSchema,
override val instance: IJsonNumber
) : ValidationFailure("${instance.value} is greater than maximum ${schema.maximum}", schema, instance, Keyword.MAXIMUM)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy