com.github.erosb.jsonsKema.UniqueItems.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 UniqueItemsSchema(val unique: Boolean, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitUniqueItemsSchema(this)
}
internal val uniqueItemsLoader: KeywordLoader = { ctx ->
UniqueItemsSchema(ctx.keywordValue.requireBoolean().value, ctx.location)
}
data class UniqueItemsValidationFailure(
val arrayPositions: List,
override val schema: UniqueItemsSchema,
override val instance: IJsonArray<*>
) : ValidationFailure("the same array element occurs at positions " + arrayPositions.joinToString(", "), schema, instance, Keyword.UNIQUE_ITEMS)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy