Documentation
¶
Overview ¶
Package schema provides typed JSON Schema structures for type coercion and defaults.
This package wraps raw JSON Schema maps (map[string]any) into typed structures that provide type-safe operations like coercion and default value application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TypeCoercer ¶
TypeCoercer coerces values to their expected types. Implementations return the coerced value, or the original if coercion fails.
func MakeSchema ¶
func MakeSchema(raw map[string]any) TypeCoercer
MakeSchema parses a raw JSON Schema map into typed Schema structures. Always returns a valid TypeCoercer; callers do not need to nil-check. For nil, empty, or unknown schema types, returns a passthrough coercer that returns values unchanged.
Click to show internal directories.
Click to hide internal directories.