validation

package
v0.20.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Strict

Strict returns a deep copy of the schema but modified so that all objects are closed for extension unless otherwise specified.

func Validate

func Validate(props *apiextv1.JSONSchemaProps, value any) error

Validate verifies that the value matches the schema. If the schema was generated using the yoke openapi package, unknown fields are not errors. To validate no unknown fields are present use ValidateStrict.

func ValidateStrict

func ValidateStrict(props *apiextv1.JSONSchemaProps, value any) error

ValidateStrict deep copies the schema and modifies the copy such that additionalProperties are not allowed for objects that don't define any. By default objects are open. This closes them for extension. This is the same as validating against the validation.Strict(schema).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL