Class MirageApiReportWriter

java.lang.Object
com.arc_e_tect.gradle.mirage.report.MirageApiReportWriter

public class MirageApiReportWriter extends Object
Writes the AsciiDoc mirage API report: every OpenAPI operation that has no matching @RestController implementation.

Every report opens with a preamble explaining what a mirage API is, loaded from the "mirage-api-preamble.adoc" classpath resource so that explanatory text can be revised without touching this class.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new MirageApiReportWriter.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(File outputFile, int totalDescribedCount, List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> mirages, String systemUnderTestVersion)
    Writes the report to outputFile, creating its parent directory if necessary.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MirageApiReportWriter

      public MirageApiReportWriter()
      Creates a new MirageApiReportWriter.
  • Method Details

    • write

      public void write(File outputFile, int totalDescribedCount, List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> mirages, String systemUnderTestVersion) throws IOException
      Writes the report to outputFile, creating its parent directory if necessary.
      Parameters:
      outputFile - target AsciiDoc file
      totalDescribedCount - total number of endpoints described by the OpenAPI documentation
      mirages - the described endpoints not implemented by any controller
      systemUnderTestVersion - version of the system under test that was scanned
      Throws:
      IOException - if the output file cannot be written