docval

package
v0.2.3-alpha06 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAndParse

func ValidateAndParse(docBytes []byte, schemaBytes []byte, docType string) (map[string]any, error)

ValidateAndParse is the only exported function. It accepts raw document bytes (YAML or JSON), a JSON Schema (bytes), and a docType tag (reserved for future behavior). It returns the parsed markup as map[string]any when the JSON Schema validates.

Types

type FileValidator

type FileValidator interface {
	ValidateAndParseFile(docPath string, schemaPath string) (map[string]any, error)
}

func NewFileValidator

func NewFileValidator(rootSchemaDir string) FileValidator

Jump to

Keyboard shortcuts

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