com.github.erosb.jsonsKema.AllOf.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 AllOfSchema(
val subschemas: List,
override val location: SourceLocation
) : Schema(location) {
override fun accept(visitor: SchemaVisitor
) = visitor.visitAllOfSchema(this)
override fun subschemas(): Collection = subschemas
}
internal val allOfLoader: KeywordLoader = { ctx ->
AllOfSchema(arrayToSubschemaList(ctx.keywordValue.requireArray(), ctx.subschemaLoader), ctx.location)
}
data class AllOfValidationFailure(
override val schema: AllOfSchema,
override val instance: IJsonValue,
override val causes: Set
) : ValidationFailure(
message = "${causes.size} subschemas out of ${schema.subschemas.size} failed to validate",
schema = schema,
instance = instance,
causes = causes,
keyword = Keyword.ALL_OF
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy