com.github.erosb.jsonsKema.MaxItems.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 MaxItemsSchema(val maxItems: Number, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitMaxItemsSchema(this)
}
internal val maxItemsLoader: KeywordLoader = { ctx ->
MaxItemsSchema(ctx.keywordValue.requireNumber().value, ctx.location)
}
data class MaxItemsValidationFailure(
override val schema: MaxItemsSchema,
override val instance: IJsonArray<*>,
override val dynamicPath: JsonPointer
) : ValidationFailure("expected maximum items: ${schema.maxItems}, found ${instance.length()}", schema, instance, Keyword.MAX_ITEMS)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy