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