com.github.erosb.jsonsKema.Const.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 ConstSchema(val constant: IJsonValue, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
) = visitor.visitConstSchema(this)
}
internal val constLoader: KeywordLoader = { ctx -> ConstSchema(ctx.keywordValue, ctx.location)}
data class ConstValidationFailure(
override val schema: ConstSchema,
override val instance: IJsonValue
) : ValidationFailure(
"actual instance is not the same as expected constant value",
schema,
instance,
Keyword.CONST
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy