struct CycloneDX::VersionGate::Violation

Overview

A single spec-version violation: the JSON path of the owning object, the offending field, the minimum spec version it requires, and a description of what the gate did about it.

#repaired says whether the gate could make the document valid anyway. Almost everything is repairable — a too-new field is stripped, a too-new enum value is swapped for its catch-all — and those are a lossy downgrade, not an invalid document. The exception is an enum with no catch-all (component/@type), where the value has to stay and the output really is invalid. Validator reports the two differently for that reason.

Defined in:

cyclonedx/version_gate.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path : String, field : String, min_version : String, message : String, repaired : Bool = true) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(path _path = @path, field _field = @field, min_version _min_version = @min_version, message _message = @message, repaired _repaired = @repaired) #

[View source]
def field : String #

def message : String #

def min_version : String #

def path : String #

def repaired : Bool #