com.github.erosb.jsonsKema.MinProperties.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 MinPropertiesSchema(val minProperties: Number, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitMinPropertiesSchema(this)
}
internal val minPropertiesLoader: KeywordLoader = { ctx ->
MinPropertiesSchema(ctx.keywordValue.requireNumber().value, ctx.location)
}
data class MinPropertiesValidationFailure(
override val schema: MinPropertiesSchema,
override val instance: IJsonObj
) : ValidationFailure("expected minimum properties: ${schema.minProperties}, found only ${instance.properties.size}", schema, instance, Keyword.MIN_PROPERTIES)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy