com.github.erosb.jsonsKema.Not.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 NotSchema(val negatedSchema: Schema, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitNotSchema(this)
override fun subschemas(): Collection = listOf(negatedSchema)
}
internal val notSchemaLoader: KeywordLoader = { ctx ->
NotSchema(ctx.subschemaLoader(ctx.keywordValue), ctx.location)
}
data class NotValidationFailure(
override val schema: Schema,
override val instance: IJsonValue
) : ValidationFailure("negated subschema did not fail", schema, instance, Keyword.NOT)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy