Class MirageApiReportWriter
java.lang.Object
com.arc_e_tect.gradle.mirage.report.MirageApiReportWriter
Writes the AsciiDoc mirage API report: every OpenAPI operation that has no matching
@RestController implementation.
Every report opens with a preamble explaining what a mirage API is, loaded from the "mirage-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 totalDescribedCount, List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> mirages, String systemUnderTestVersion) Writes the report tooutputFile, creating its parent directory if necessary.voidwrite(File outputFile, int totalDescribedCount, List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> mirages, String systemUnderTestVersion, boolean scanMocks) Writes the report tooutputFile, creating its parent directory if necessary.
-
Constructor Details
-
MirageApiReportWriter
public MirageApiReportWriter()Creates a newMirageApiReportWriter.
-
-
Method Details
-
write
public void write(File outputFile, int totalDescribedCount, List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> mirages, String systemUnderTestVersion) throws IOException Writes the report tooutputFile, creating its parent directory if necessary. Equivalent to callingwrite(File, int, List, String, boolean)withscanMocksfalse.- Parameters:
outputFile- target AsciiDoc filetotalDescribedCount- total number of endpoints described by the OpenAPI documentationmirages- the described endpoints not implemented by any controllersystemUnderTestVersion- 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 totalDescribedCount, List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> mirages, String systemUnderTestVersion, boolean scanMocks) throws IOException Writes the report tooutputFile, creating its parent directory if necessary.- Parameters:
outputFile- target AsciiDoc filetotalDescribedCount- total number of endpoints described by the OpenAPI documentationmirages- the described endpoints with no matching implementation evidencesystemUnderTestVersion- version of the system under test that was scannedscanMocks- whether implemented endpoints were determined from WireMock stubs rather than@RestControllerclasses - only affects report wording, not its structure- Throws:
IOException- if the output file cannot be written
-