Class DoppelgangerApiReportWriter
java.lang.Object
com.arc_e_tect.gradle.doppelganger.report.DoppelgangerApiReportWriter
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite(File outputFile, int totalCandidateCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> doppelgangers, String systemUnderTestVersion) Writes the report tooutputFile, creating its parent directory if necessary.voidwrite(File outputFile, int totalCandidateCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> doppelgangers, 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
-
DoppelgangerApiReportWriter
public DoppelgangerApiReportWriter()Creates a newDoppelgangerApiReportWriter.
-
-
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 tooutputFile, creating its parent directory if necessary. Equivalent towrite(File, int, List, String, Map)with an empty contract history.- Parameters:
outputFile- target AsciiDoc filetotalCandidateCount- total number of endpoints both declared and implemented, i.e. the candidate pool checked for verification evidencedoppelgangers- the candidate endpoints with no verification evidencesystemUnderTestVersion- 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 totalCandidateCount, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> doppelgangers, 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 filetotalCandidateCount- total number of endpoints both declared and implemented, i.e. the candidate pool checked for verification evidencedoppelgangers- the candidate endpoints with no verification evidencesystemUnderTestVersion- 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
-