com.github.erosb.jsonsKema.MaxProperties.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
The newest version!
package com.github.erosb.jsonsKema
data class MaxPropertiesSchema(val maxProperties: Number, override val location: SourceLocation) : Schema(location) {
override fun accept(visitor: SchemaVisitor
): P? = visitor.visitMaxPropertiesSchema(this)
}
internal val maxPropertiesLoader: KeywordLoader = { ctx ->
MaxPropertiesSchema(ctx.keywordValue.requireNumber().value, ctx.location)
}
data class MaxPropertiesValidationFailure(
override val schema: MaxPropertiesSchema,
override val instance: IJsonObj,
override val dynamicPath: JsonPointer
) : ValidationFailure("expected maximum properties: ${schema.maxProperties}, found ${instance.properties.size}", schema, instance, Keyword.MIN_PROPERTIES)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy