com.github.erosb.jsonsKema.Required.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 RequiredSchema(val requiredProperties: List, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitRequiredSchema(this)
}
internal val requiredLoader: KeywordLoader = { ctx ->
RequiredSchema(
ctx.keywordValue.requireArray().elements.map { it.requireString().value },
ctx.location
)
}
data class RequiredValidationFailure(
val missingProperties: List,
override val schema: RequiredSchema,
override val instance: IJsonObj
) : ValidationFailure(
"required properties are missing: " + missingProperties.joinToString(),
schema,
instance,
Keyword.REQUIRED
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy