com.github.erosb.jsonsKema.MinItems.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
The newest version!
package com.github.erosb.jsonsKema
data class MinItemsSchema(val minItems: Number, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitMinItemsSchema(this)
}
internal val minItemsLoader: KeywordLoader = { ctx ->
MinItemsSchema(ctx.keywordValue.requireNumber().value, ctx.location)
}
data class MinItemsValidationFailure(
override val schema: MinItemsSchema,
override val instance: IJsonArray<*>,
override val dynamicPath: JsonPointer
) : ValidationFailure("expected minimum items: ${schema.minItems}, found only ${instance.length()}", schema, instance, Keyword.MIN_ITEMS)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy