Class ShadowApiReportWriter
java.lang.Object
com.arc_e_tect.gradle.shadow.report.ShadowApiReportWriter
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(File outputFile, int totalEndpointCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> shadows, String systemUnderTestVersion) Writes the report tooutputFile, creating its parent directory if necessary.voidwrite(File outputFile, int totalEndpointCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> shadows, String systemUnderTestVersion, Map<String, com.arc_e_tect.gradle.detector.core.progress.ContractProgressRecord> contractHistory) Writes the report tooutputFile, creating its parent directory if necessary.
-
Constructor Details
-
ShadowApiReportWriter
public ShadowApiReportWriter()Creates a newShadowApiReportWriter.
-
-
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 tooutputFile, creating its parent directory if necessary. Equivalent towrite(File, int, List, String, Map)with an empty contract history.- Parameters:
outputFile- target AsciiDoc filetotalEndpointCount- total number of endpoints found across all scanned controllersshadows- the endpoints not described in the OpenAPI documentationsystemUnderTestVersion- version of the system under test that was scanned- Throws:
IOException- if the output file cannot be written
-
write
public void write(File outputFile, int totalEndpointCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> shadows, String systemUnderTestVersion, Map<String, com.arc_e_tect.gradle.detector.core.progress.ContractProgressRecord> contractHistory) throws IOExceptionWrites the report tooutputFile, creating its parent directory if necessary.- Parameters:
outputFile- target AsciiDoc filetotalEndpointCount- total number of endpoints found across all scanned controllersshadows- the endpoints not described in the OpenAPI documentationsystemUnderTestVersion- version of the system under test that was scannedcontractHistory- contract progress history to render as a== Progress Over Timesection, keyed by fingerprint; when empty, no such section is written- Throws:
IOException- if the output file cannot be written
-