Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProfileSchema ¶
GetProfileSchema returns the raw YAML bytes of the embedded meta-schema for a profile.
Types ¶
type CoerceMode ¶
type CoerceMode = engine.CoerceMode
CoerceMode specifies the coercion aggressiveness.
const ( CoerceModeConservative CoerceMode = engine.CoerceModeConservative CoerceModePermissive CoerceMode = engine.CoerceModePermissive CoerceModeOff CoerceMode = engine.CoerceModeOff )
type CoerceOptions ¶
type CoerceOptions = engine.CoerceOptions
CoerceOptions configures coercion behavior.
type ProfileInfo ¶
type ProfileInfo struct {
ID ProfileID
Title string
Description string
Baseline string
SchemaFile string // path relative to embed FS root
}
ProfileInfo describes a profile.
func GetProfileInfo ¶
func GetProfileInfo(id ProfileID) (ProfileInfo, error)
GetProfileInfo returns the info for a profile ID.
func ListProfiles ¶
func ListProfiles() []ProfileInfo
ListProfiles returns all registered profile infos.
type Report ¶
Report is the canonical output of validation or coercion.
func CoerceSchema ¶
func CoerceSchema(profileID ProfileID, schemaBytes []byte, opts *CoerceOptions) ([]byte, *Report, bool, error)
CoerceSchema attempts to make a schema compliant with a profile. Returns the coerced schema bytes, a report of changes, and whether any changes were made.
func ValidateSchema ¶
func ValidateSchema(profileID ProfileID, schemaBytes []byte, opts *ValidateOptions) (*Report, error)
ValidateSchema validates a candidate JSON Schema against a profile. It runs Phase 1 (meta-schema validation) and Phase 2 (provider-specific code checks).
type Severity ¶
Severity represents the severity of a finding.
const ( SeverityError Severity = engine.SeverityError SeverityWarning Severity = engine.SeverityWarning SeverityInfo Severity = engine.SeverityInfo )
type ValidateOptions ¶
type ValidateOptions = engine.ValidateOptions
ValidateOptions configures validation behavior.