com.github.erosb.jsonsKema.MinLength.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 MinLengthSchema(val minLength: Int, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
) = visitor.visitMinLengthSchema(this)
}
internal val minLengthLoader: KeywordLoader = { ctx ->
MinLengthSchema(ctx.keywordValue.requireInt(), ctx.location)
}
data class MinLengthValidationFailure(
override val schema: MinLengthSchema,
override val instance: IJsonString
) : ValidationFailure(
"actual string length ${instance.value.length} is lower than minLength ${schema.minLength}",
schema,
instance,
Keyword.MIN_LENGTH
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy