Class OpenApiCoverageReporter
java.lang.Object
com.shaft.capture.generate.api.internal.OpenApiCoverageReporter
Cross-reports the endpoints recorded in an API capture session against the operations declared
by a provided OpenAPI (2.0/3.x) spec, in either JSON or YAML. Read-only and deterministic --
this never mutates the spec or the recording, and never requires AI: it is a set comparison
between
METHOD normalized-path pairs, where a normalized path replaces every recorded
path segment that looks like an identifier (numeric, or a UUID) with an OpenAPI-style
{param} placeholder so that e.g. GET /orders/42 matches a declared
GET /orders/{orderId} operation.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordDeterministic coverage report diffing recorded transactions against a declared OpenAPI spec. -
Method Summary
Modifier and TypeMethodDescriptionreport(Path specPath, List<ApiTransaction> transactions) Loads an OpenAPI spec (JSON or YAML, detected by file extension, falling back to content-sniffing) and reports coverage against the recorded transactions.
-
Method Details
-
report
public static OpenApiCoverageReporter.CoverageReport report(Path specPath, List<ApiTransaction> transactions) Loads an OpenAPI spec (JSON or YAML, detected by file extension, falling back to content-sniffing) and reports coverage against the recorded transactions.- Parameters:
specPath- path to the OpenAPI spec filetransactions- recorded, renderable API transactions- Returns:
- deterministic coverage report;
OpenApiCoverageReporter.CoverageReport.loadable()isfalseand every other field is empty when the spec could not be read or parsed
-