Class DoppelgangerApiReportWriter

java.lang.Object
com.arc_e_tect.gradle.doppelganger.report.DoppelgangerApiReportWriter

public class DoppelgangerApiReportWriter extends Object
Writes the AsciiDoc doppelganger API report: every endpoint that is declared in the OpenAPI documentation and implemented by a @RestController method, but has no verification evidence from any enabled ContractVerificationSource.

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

  • Constructor Details

    • DoppelgangerApiReportWriter

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

    • write

      public void write(File outputFile, int totalCandidateCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> doppelgangers, String systemUnderTestVersion) throws IOException
      Writes the report to outputFile, creating its parent directory if necessary.
      Parameters:
      outputFile - target AsciiDoc file
      totalCandidateCount - total number of endpoints both declared and implemented, i.e. the candidate pool checked for verification evidence
      doppelgangers - the candidate endpoints with no verification evidence
      systemUnderTestVersion - version of the system under test that was scanned
      Throws:
      IOException - if the output file cannot be written