You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ys is a Go library that validates YAML documents against schemas defined in Go code. Schemas use a developer-friendly DSL that reads naturally and supports nested objects, arrays, required/optional fields, and type checking.
Goals
Developer-friendly DSL: Schema definitions should be easy to read and write in Go
Rich error reporting: Return structured errors with line numbers from the YAML source
Type safety: Validate strings, integers, floats, booleans, arrays, objects
Nested structures: Support deeply nested objects and arrays with their own schemas
Required/Optional: Fields can be marked as required or optional at any nesting level
typeResultstruct {
OKboolErrors []SchemaError
}
typeSchemaErrorstruct {
Pathstring// e.g. "address.street"Lineint// line number in YAML sourceMessagestring// human-readable error message
}