Class FilesOutput

java.lang.Object
org.alexmond.yaml.validator.output.FilesOutput

public class FilesOutput extends Object
Represents the output format for file validation results. This class handles the structured output of validation results for multiple files, providing various output formats including colored console output, JSON, YAML, and JUnit XML.
See Also:
  • Constructor Details

    • FilesOutput

      public FilesOutput(Map<String,com.networknt.schema.output.OutputUnit> files)
      Constructs a new FilesOutput instance with the given validation results.
      Parameters:
      files - Map of filename to validation results
  • Method Details

    • toColoredString

      public String toColoredString(boolean color)
      Converts the validation results to a human-readable string with optional ANSI color formatting.
      Parameters:
      color - true to enable ANSI color output, false for plain text
      Returns:
      formatted string representation of the validation results
    • toJsonString

      public String toJsonString()
      Converts the validation results to a JSON string representation.
      Returns:
      JSON string of the validation results
      Throws:
      RuntimeException - if JSON conversion fails
    • toYamlString

      public String toYamlString()
      Converts the validation results to a YAML string representation.
      Returns:
      YAML string of the validation results
      Throws:
      RuntimeException - if YAML conversion fails
    • toJunitString

      public String toJunitString()
      Converts the validation results to JUnit XML format.
      Returns:
      JUnit XML string representation of the validation results