Class MirageApiFinder

java.lang.Object
com.arc_e_tect.gradle.mirage.detect.MirageApiFinder

public class MirageApiFinder extends Object
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.
  • Constructor Details

    • MirageApiFinder

      public MirageApiFinder()
      Creates a new MirageApiFinder.
  • Method Details

    • findMirages

      public List<DescribedEndpoint> findMirages(List<DescribedEndpoint> described, List<Endpoint> endpoints)
      Returns every endpoint in described that has no matching entry in endpoints.

      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 @RequestMapping that does not restrict its HTTP method implements every verb documented for a matching path.

      Parameters:
      described - the endpoints described by the OpenAPI documentation
      endpoints - the endpoints found by scanning @RestController classes
      Returns:
      the described endpoints that are not implemented, in the order they were passed in