Class MirageApiFinder
java.lang.Object
com.arc_e_tect.gradle.mirage.detect.MirageApiFinder
Determines which
DescribedEndpoints collected from the OpenAPI documentation have no
matching controller Endpoint, i.e. which endpoints are "mirage APIs" - endpoints that
are declared but never implemented.
Delegates to the shared ContractSetOperations.difference(List, List) in
api-detector-core.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> findMirages(List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> described, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> endpoints) Returns every endpoint indescribedthat has no matching entry inendpoints.
-
Constructor Details
-
MirageApiFinder
public MirageApiFinder()Creates a newMirageApiFinder.
-
-
Method Details
-
findMirages
public List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> findMirages(List<com.arc_e_tect.gradle.detector.core.openapi.DescribedEndpoint> described, List<com.arc_e_tect.gradle.detector.core.model.Endpoint> endpoints) Returns every endpoint indescribedthat has no matching entry inendpoints.A described endpoint is considered implemented as soon as a scanned controller endpoint matches its path and either matches its verb exactly or carries
HttpVerb.ANY- a Spring@RequestMappingthat does not restrict its HTTP method implements every verb documented for a matching path.- Parameters:
described- the endpoints described by the OpenAPI documentationendpoints- the endpoints found by scanning@RestControllerclasses- Returns:
- the described endpoints that are not implemented, in the order they were passed in
-