Class ApiOnlySuiteExtension

java.lang.Object
com.arc_e_tect.gradle.suite.ApiOnlySuiteExtension

public abstract class ApiOnlySuiteExtension extends Object
DSL extension for the Arc-E-Tect API-Only Suite Gradle plugin.

This is a thin convenience extension, not a full proxy for the three underlying detector plugins: it exposes only the two settings that are almost always identical across all three in practice - getRootDocument() and getControllerDirs(). Any setting not exposed here must be configured directly on the individual plugin's own extension block (shadowApiDetector { }, mirageApiDetector { }, doppelgangerApiDetector { }).

Both properties configured here are forwarded to all three underlying extensions as a fallback convention, applied only where a consumer has not already configured that property directly on the individual extension. An explicit per-plugin value always wins over a value configured here, regardless of the order the two are configured in the build script.

 apiOnlySuite {
     rootDocument = file('src/main/resources/openapi/openapi.yaml')
     controllerDirs.from('src/main/java')
 }
 
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Extension DSL block name, i.e.
  • Constructor Summary

    Constructors
    Constructor
    Description
    For use by the Gradle-generated concrete subclass.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.file.ConfigurableFileCollection
    Directories to search recursively for @RestController classes, shared by all three underlying detector plugins (Doppelganger API Detector's separate testDirs is not covered here, since it has no equivalent in the other two plugins).
    abstract org.gradle.api.file.RegularFileProperty
    The root OpenAPI document shared by all three underlying detector plugins.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NAME

      public static final String NAME
      Extension DSL block name, i.e. the name used to register the extension with the project.
      See Also:
  • Constructor Details

    • ApiOnlySuiteExtension

      public ApiOnlySuiteExtension()
      For use by the Gradle-generated concrete subclass.
  • Method Details

    • getRootDocument

      public abstract org.gradle.api.file.RegularFileProperty getRootDocument()
      The root OpenAPI document shared by all three underlying detector plugins. Forwarded as a fallback convention to each plugin's own rootDocument property; a value set directly on an individual plugin's own extension always takes precedence over this one.
      Returns:
      mutable file property for the shared root OpenAPI document
    • getControllerDirs

      public abstract org.gradle.api.file.ConfigurableFileCollection getControllerDirs()
      Directories to search recursively for @RestController classes, shared by all three underlying detector plugins (Doppelganger API Detector's separate testDirs is not covered here, since it has no equivalent in the other two plugins). Forwarded as a fallback to each plugin's own controllerDirs property; directories configured directly on an individual plugin's own extension always take precedence over this one.
      Returns:
      mutable file collection of shared controller source directories