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 Details

    • ShadowApiReportWriter

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

    • write

      public void write(File outputFile, int totalEndpointCount, List<Endpoint> shadows) 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
      Throws:
      IOException - if the output file cannot be written