Class ResponseCoverageAnalyzer

java.lang.Object
com.arc_e_tect.gradle.doppelganger.detect.ResponseCoverageAnalyzer

public class ResponseCoverageAnalyzer extends Object
Computes, for every endpoint both declared in the OpenAPI documentation and implemented by a @RestController method, how many contract tests exist for it and - only when requested - how many of those tests cover each of its declared response codes.

A verified test's status code is matched against a declared response code by exact string equality only: a test detected to assert "404" counts towards a declared "404" response, never towards a declared "4XX" range wildcard or a "default" response, even though either might, in the OpenAPI document's own semantics, legitimately cover that same test. Resolving that would require interpreting the OpenAPI response-matching rules themselves, not just comparing two strings - the same kind of imprecision PathMatcher.matchesConcrete(String, String) already documents for path matching.