All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.erosb.jsonsKema.DependentRequired.kt Maven / Gradle / Ivy

The newest version!
package com.github.erosb.jsonsKema

data class DependentRequiredSchema(val dependentRequired: Map>, override val location: SourceLocation) : Schema(location) {
    override fun 

accept(visitor: SchemaVisitor

): P? = visitor.visitDependentRequiredSchema(this) } internal val dependentRequiredLoader: KeywordLoader = { ctx -> val dependentRequired = ctx.keywordValue.requireObject().properties .map { it.key.value to it.value.requireArray().elements.map { it.requireString().value } } .toMap() DependentRequiredSchema(dependentRequired, ctx.location) } data class DependentRequiredValidationFailure( val presentKey: String, val missingKeys: Set, override val schema: DependentRequiredSchema, override val instance: IJsonObj, override val dynamicPath: JsonPointer ) : ValidationFailure("property $presentKey is present in the object but the following properties are missing: ${missingKeys.joinToString(", ")}", schema, instance, Keyword.DEPENDENT_REQUIRED)





© 2015 - 2025 Weber Informatics LLC | Privacy Policy