com.github.erosb.jsonsKema.PrefixItems.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 PrefixItemsValidationFailure(
val itemFailures: Map,
override val schema: PrefixItemsSchema,
override val instance: IJsonArray<*>
) : ValidationFailure(
"array items ${itemFailures.keys.joinToString(", ")} failed to validate against \"prefixItems\" subschema",
schema,
instance,
Keyword.PREFIX_ITEMS,
itemFailures.values.toSet()
)
internal val prefixItemsLoader: KeywordLoader = { ctx ->
PrefixItemsSchema(ctx.keywordValue.requireArray().elements.map { ctx.subschemaLoader(it) }, ctx.location)
}
data class PrefixItemsSchema(val prefixSchemas: List, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitPrefixItemsSchema(this)
override fun subschemas(): Collection = prefixSchemas
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy