% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vlm-schemas.R
\name{validate_against_schema}
\alias{validate_against_schema}
\title{Validate a JSON string against a packaged schema}
\usage{
validate_against_schema(json_string, schema_name, engine = "ajv")
}
\arguments{
\item{json_string}{A character scalar holding the JSON document to
validate (e.g. the raw string returned by a VLM call).}

\item{schema_name}{Short schema name as accepted by
\code{\link{load_schema}}.}

\item{engine}{Validation engine to use; passed through to
\code{jsonvalidate::json_validate}. Default
\code{"ajv"} supports draft-07.}
}
\value{
A list with elements:
  \itemize{
    \item \code{valid}: \code{TRUE} / \code{FALSE}.
    \item \code{errors}: character vector of validation error
          messages (empty if \code{valid}).
  }
}
\description{
Thin wrapper around \code{jsonvalidate::json_validate} that
resolves a schema by short name (\code{"horizon"}, \code{"site"})
and returns a normalized result list with \code{valid} (logical)
and \code{errors} (character vector, possibly empty).
}
\keyword{internal}
