validation

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSchemaInvalid    = errors.New("schema invalid")
	ErrSchemaValidation = errors.New("schema validation failed")
)

Functions

func NormalizeSchema

func NormalizeSchema(schema map[string]any) map[string]any

NormalizeSchema converts a schema definition into a JSON schema.

func ValidatePartialPayload

func ValidatePartialPayload(schema map[string]any, payload map[string]any) error

ValidatePartialPayload validates payload without enforcing required fields.

func ValidatePayload

func ValidatePayload(schema map[string]any, payload map[string]any) error

ValidatePayload validates payload against the provided schema.

func ValidateSchema

func ValidateSchema(schema map[string]any) error

ValidateSchema ensures the schema can be compiled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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