Record Class CaptureGenerationReport.OpenApiCoverage
java.lang.Object
java.lang.Record
com.shaft.capture.generate.CaptureGenerationReport.OpenApiCoverage
- Record Components:
loadable- whether the provided spec could be read and parsedloadFailureReason- safe reasonloadableisfalse; empty otherwisecoveredOperations-METHOD normalized-pathoperations recorded AND declaredmissingOperations-METHOD normalized-pathoperations declared but never recordedundeclaredOperations-METHOD normalized-pathoperations recorded but not declaredtotalDeclaredOperations- total number of operations declared by the speccoverageRatio-coveredOperations.size() / totalDeclaredOperations
- Enclosing class:
CaptureGenerationReport
public static record CaptureGenerationReport.OpenApiCoverage(boolean loadable, String loadFailureReason, List<String> coveredOperations, List<String> missingOperations, List<String> undeclaredOperations, int totalDeclaredOperations, double coverageRatio)
extends Record
Deterministic OpenAPI coverage cross-report (see
OpenApiCoverageReporter in
com.shaft.capture.generate.api.internal, which this record mirrors so the report can
live in this module without an API-codegen-specific dependency).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecoverageRatiorecord component.Returns the value of thecoveredOperationsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanloadable()Returns the value of theloadablerecord component.Returns the value of theloadFailureReasonrecord component.Returns the value of themissingOperationsrecord component.Returns the default state when no OpenAPI spec was provided.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalDeclaredOperationsrecord component.Returns the value of theundeclaredOperationsrecord component.
-
Constructor Details
-
OpenApiCoverage
public OpenApiCoverage(boolean loadable, String loadFailureReason, List<String> coveredOperations, List<String> missingOperations, List<String> undeclaredOperations, int totalDeclaredOperations, double coverageRatio) Creates an instance of aOpenApiCoveragerecord class.- Parameters:
loadable- the value for theloadablerecord componentloadFailureReason- the value for theloadFailureReasonrecord componentcoveredOperations- the value for thecoveredOperationsrecord componentmissingOperations- the value for themissingOperationsrecord componentundeclaredOperations- the value for theundeclaredOperationsrecord componenttotalDeclaredOperations- the value for thetotalDeclaredOperationsrecord componentcoverageRatio- the value for thecoverageRatiorecord component
-
-
Method Details
-
notRequested
Returns the default state when no OpenAPI spec was provided.- Returns:
- not-requested coverage
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
loadable
-
loadFailureReason
Returns the value of theloadFailureReasonrecord component.- Returns:
- the value of the
loadFailureReasonrecord component
-
coveredOperations
Returns the value of thecoveredOperationsrecord component.- Returns:
- the value of the
coveredOperationsrecord component
-
missingOperations
Returns the value of themissingOperationsrecord component.- Returns:
- the value of the
missingOperationsrecord component
-
undeclaredOperations
Returns the value of theundeclaredOperationsrecord component.- Returns:
- the value of the
undeclaredOperationsrecord component
-
totalDeclaredOperations
public int totalDeclaredOperations()Returns the value of thetotalDeclaredOperationsrecord component.- Returns:
- the value of the
totalDeclaredOperationsrecord component
-
coverageRatio
public double coverageRatio()Returns the value of thecoverageRatiorecord component.- Returns:
- the value of the
coverageRatiorecord component
-