Class ApiOnlySuiteExtension
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.file.ConfigurableFileCollectionDirectories to search recursively for@RestControllerclasses, shared by all three underlying detector plugins (Doppelganger API Detector's separatetestDirsis not covered here, since it has no equivalent in the other two plugins).abstract org.gradle.api.file.RegularFilePropertyThe root OpenAPI document shared by all three underlying detector plugins.
-
Field Details
-
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 ownrootDocumentproperty; 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@RestControllerclasses, shared by all three underlying detector plugins (Doppelganger API Detector's separatetestDirsis not covered here, since it has no equivalent in the other two plugins). Forwarded as a fallback to each plugin's owncontrollerDirsproperty; 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
-