Class ShadowApiFinder

java.lang.Object
com.arc_e_tect.gradle.shadow.detect.ShadowApiFinder

public class ShadowApiFinder extends Object
Determines which controller Endpoints are not described by any DescribedEndpoint collected from the OpenAPI documentation, i.e. which endpoints are "shadow APIs".
  • Constructor Details

    • ShadowApiFinder

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

    • findShadows

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

      An endpoint whose verb is HttpVerb.ANY (a Spring @RequestMapping that does not restrict its HTTP method) is considered described as soon as any verb is documented for a matching path.

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