com.github.erosb.jsonsKema.ReadOnly.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 ReadOnlySchema(
override val location: SourceLocation
) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitReadOnlySchema(this)
}
internal val readOnlyLoader: KeywordLoader = {
if (it.keywordValue.requireBoolean().value)
ReadOnlySchema(it.location)
else
null
}
data class ReadOnlyValidationFailure(
override val schema: Schema,
override val instance: IJsonValue,
) : ValidationFailure(
message = "read-only property \"${instance.location.pointer.segments.last()}\" should not be present in write context",
schema = schema,
instance = instance,
keyword = Keyword.READ_ONLY,
causes = setOf()
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy