validator

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Path    string `json:"path"`    // JSON Pointer path, e.g., "/name" or "/non-schema"
	Message string `json:"message"` // Human readable description
}

Issue represents a single schema validation error or warning.

type Result

type Result struct {
	Valid    bool               `json:"valid"`              // true if no fatal errors exist
	Schema   *schema.SchemaInfo `json:"schema"`             // metadata about the schema used
	Errors   []Issue            `json:"errors"`             // fatal validation error issues
	Warnings []Issue            `json:"warnings,omitempty"` // non-fatal warnings (e.g., unknown top-level fields)
}

Result holds the validation status, schema metadata, errors, and warnings.

func Validate

func Validate(manifestBytes []byte, schemaInfo *schema.SchemaInfo) (*Result, error)

Validate validates a manifest JSON against the given schema bytes and metadata. Unknown top-level fields are treated as non-fatal warnings per Agent Plugins Spec §5.2.

Jump to

Keyboard shortcuts

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