Help us shape the future of Go! Take the 2026 Go Developer Survey

schemavalidate

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package schemavalidate provides utilities for validating JSON schemas.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDefaults

func ApplyDefaults(schema *jsonschema.Schema, obj map[string]any)

ApplyDefaults recursively applies default values from the schema to the object.

func CompileSchemaFromMap

func CompileSchemaFromMap(schemaData map[string]any) (*jsonschema.Schema, error)

CompileSchemaFromMap compiles a JSON schema from a map.

func CompileSchemaFromPB

func CompileSchemaFromPB(schemaData *structpb.Struct) (*jsonschema.Schema, error)

CompileSchemaFromPB compiles a JSON schema from a protobuf Struct.

func ValidateAgainstSchema

func ValidateAgainstSchema(schema *jsonschema.Schema, obj map[string]any) error

ValidateAgainstSchema validates an object against a JSON schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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