Class ShadowApiReportWriter

java.lang.Object
com.arc_e_tect.gradle.shadow.report.ShadowApiReportWriter

public class ShadowApiReportWriter extends Object
Writes the AsciiDoc shadow API report: every @RestController endpoint that is not described in the configured OpenAPI documentation.

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

  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new ShadowApiReportWriter.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    write(File outputFile, int totalEndpointCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> shadows, 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

    • ShadowApiReportWriter

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

    • write

      public void write(File outputFile, int totalEndpointCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> shadows, String systemUnderTestVersion) throws IOException
      Writes the report to outputFile, creating its parent directory if necessary.
      Parameters:
      outputFile - target AsciiDoc file
      totalEndpointCount - total number of endpoints found across all scanned controllers
      shadows - the endpoints not described in the OpenAPI documentation
      systemUnderTestVersion - version of the system under test that was scanned
      Throws:
      IOException - if the output file cannot be written