All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.erosb.jsonsKema.OneOf.kt Maven / Gradle / Ivy

The newest version!
package com.github.erosb.jsonsKema

data class OneOfSchema(
    val subschemas: List,
    override val location: SourceLocation
) : Schema(location) {
    override fun 

accept(visitor: SchemaVisitor

) = visitor.visitOneOfSchema(this) override fun subschemas(): Collection = subschemas } internal val oneOfLoader: KeywordLoader = { ctx -> OneOfSchema(arrayToSubschemaList(ctx.keywordValue.requireArray(), ctx.subschemaLoader), ctx.location) } data class OneOfValidationFailure( override val schema: OneOfSchema, override val instance: IJsonValue, override val causes: Set, override val dynamicPath: JsonPointer ) : ValidationFailure( message = "expected 1 subschema to match out of ${schema.subschemas.size}, ${schema.subschemas.size - causes.size} matched", schema = schema, instance = instance, causes = causes, keyword = Keyword.ONE_OF )





© 2015 - 2025 Weber Informatics LLC | Privacy Policy