package
0.0.0-20250304201544-e5f78fe3ede9
Repository: https://github.com/kubernetes/kube-openapi.git
Documentation: pkg.go.dev
# Functions
AgainstSchema validates the specified data against the provided schema, using a registry of supported formats.
Enum validates if the data is a member of the enum.
FormatOf validates if a string matches a format in the format registry.
IsValueValidAgainstRange checks that a numeric value is compatible with the range defined by Type and Format, that is, may be converted without loss.
Maximum validates if a number is smaller than a given maximum.
MaximumInt validates if a number is smaller than a given maximum.
MaximumNativeType provides native type constraint validation as a facade to various numeric types versions of Maximum constraint check.
MaximumUint validates if a number is smaller than a given maximum.
MaxItems validates that there are at most n items in a slice.
MaxLength validates a string for maximum length.
Minimum validates if a number is smaller than a given minimum.
MinimumInt validates if a number is smaller than a given minimum.
MinimumNativeType provides native type constraint validation as a facade to various numeric types versions of Minimum constraint check.
MinimumUint validates if a number is smaller than a given minimum.
MinItems validates that there are at least n items in a slice.
MinLength validates a string for minimum length.
MultipleOf validates if the provided number is a multiple of the factor.
MultipleOfInt validates if the provided integer is a multiple of the factor.
MultipleOfNativeType provides native type constraint validation as a facade to various numeric types version of MultipleOf constraint check.
MultipleOfUint validates if the provided unsigned integer is a multiple of the factor.
NewSchemaValidator creates a new schema validator.
Pattern validates a string against a regular expression.
Required validates an interface for requiredness.
SetContinueOnErrors sets global default behavior regarding spec validation errors reporting.
UniqueItems validates that the provided slice has unique elements.
# Constants
ArrayDoesNotAllowAdditionalItemsError when an additionalItems construct is not verified by the array values provided.
HasDependencyError indicates that a dependencies construct was not verified.
InvalidTypeConversionError indicates that a numerical conversion for the given type could not be carried on.
MustNotValidateSchemaError indicates that in a Not construct, the schema constraint specified was verified.
MustValidateAllSchemasError indicates that in a AllOf construct, at least one of the schema constraints specified were not verified
TODO: punctuation in message.
MustValidateAtLeastOneSchemaError indicates that in a AnyOf construct, none of the schema constraints specified were verified.
MustValidateOnlyOneSchemaError indicates that in a OneOf construct, either none of the schema constraints specified were verified, or several were.
# Variables
Debug is true when the SWAGGER_DEBUG env var is not empty.
# Structs
Opts specifies validation options for a SpecValidator.
Result represents a validation result set, composed of errors and warnings.
SchemaValidator validates data against a JSON schema.
SchemaValidatorOptions defines optional rules for schema validation.
# Interfaces
ValueValidator validates the values it applies to.
# Type aliases
Option sets optional rules for schema validation.