Package io.smallrye.openapi.gradleplugin
Class SmallryeOpenApiTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.smallrye.openapi.gradleplugin.SmallryeOpenApiTask
- All Implemented Interfaces:
SmallryeOpenApiProperties,Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@CacheableTask
public class SmallryeOpenApiTask
extends org.gradle.api.DefaultTask
implements SmallryeOpenApiProperties
Schema generation task implementation.
See SmallryeOpenApiProperties for information about the individual options.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.Task.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
ConstructorsConstructorDescriptionSmallryeOpenApiTask(SmallryeOpenApiExtension ext, org.gradle.api.model.ObjectFactory objects, org.gradle.api.file.ProjectLayout layout, org.gradle.api.file.FileCollection classpath, org.gradle.api.file.FileCollection resourcesSrcDirs, org.gradle.api.file.FileCollection classesDirs) -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()org.gradle.api.provider.Property<Boolean>Disable scanning of the javax.ws.rs.Path (and jakarta.ws.rs.Path) for the application path.org.gradle.api.file.RegularFilePropertyLoad any properties from a file.org.gradle.api.provider.Property<String>Fully qualified name of a CustomSchemaRegistry, which can be used to specify a custom schema for a type.org.gradle.api.provider.Property<io.smallrye.openapi.api.OpenApiConfig.DuplicateOperationIdBehavior>Configuration property to specify what should happen if duplicate operationIds occur.org.gradle.api.provider.Property<String>Output encoding for openapi document.org.gradle.api.provider.Property<String>Configuration property to specify the fully qualified name of the OASFilter implementation.org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>org.gradle.api.provider.Property<String>Configuration property to specify the fully qualified name of the OASModelReader implementation.org.gradle.api.provider.Property<String>To specify a custom OpenAPI version.org.gradle.api.provider.Property<io.smallrye.openapi.api.OpenApiConfig.OperationIdStrategy>Configuration property to specify how the operationid is generated.Prefix of the configuration property to specify an alternative list of servers to service an operation.org.gradle.api.file.DirectoryPropertyDirectory where to output the schemas.org.gradle.api.provider.Property<String>Filter the type of files that will be generated, allowed values areALL,YAMLandJSON.Prefix of the configuration property to specify an alternative list of servers to service all operations in a pathorg.gradle.api.provider.ListProperty<String>Configuration property to specify the list of classes to scan.org.gradle.api.provider.Property<Boolean>Disable scanning the project's dependencies for OpenAPI model classes tooorg.gradle.api.provider.Property<Boolean>Configuration property to disable annotation scanning.org.gradle.api.provider.ListProperty<String>Configuration property to specify the list of classes to exclude from scans.org.gradle.api.provider.ListProperty<String>Configuration property to specify the list of packages to exclude from scans.org.gradle.api.provider.ListProperty<String>Profiles which explicitly exclude operations.org.gradle.api.provider.ListProperty<String>Configuration property to specify the list of packages to scan.org.gradle.api.provider.ListProperty<String>Profiles which explicitly include operations.org.gradle.api.provider.Property<String>Filename of the schema Defaults to openapi.org.gradle.api.provider.ListProperty<String>Configuration property to specify the list of global servers that provide connectivity information.Methods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
SmallryeOpenApiTask
@Inject public SmallryeOpenApiTask(SmallryeOpenApiExtension ext, org.gradle.api.model.ObjectFactory objects, org.gradle.api.file.ProjectLayout layout, org.gradle.api.file.FileCollection classpath, org.gradle.api.file.FileCollection resourcesSrcDirs, org.gradle.api.file.FileCollection classesDirs)
-
-
Method Details
-
generate
public void generate() -
getOutputDirectory
@OutputDirectory public org.gradle.api.file.DirectoryProperty getOutputDirectory()Directory where to output the schemas. If no path is specified, the schema will be printed to the log. -
getConfigProperties
@InputFile @PathSensitive(RELATIVE) @Optional public org.gradle.api.file.RegularFileProperty getConfigProperties()Description copied from interface:SmallryeOpenApiPropertiesLoad any properties from a file. This file is loaded first, and gets overwritten by explicitly set properties in the maven configuration. Example `${basedir}/src/main/resources/application.properties`.- Specified by:
getConfigPropertiesin interfaceSmallryeOpenApiProperties
-
getSchemaFilename
Description copied from interface:SmallryeOpenApiPropertiesFilename of the schema Defaults to openapi. So the files created will be openapi.yaml and openapi.json.- Specified by:
getSchemaFilenamein interfaceSmallryeOpenApiProperties
-
getScanDependenciesDisable
Description copied from interface:SmallryeOpenApiPropertiesDisable scanning the project's dependencies for OpenAPI model classes too- Specified by:
getScanDependenciesDisablein interfaceSmallryeOpenApiProperties
-
getModelReader
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the fully qualified name of the OASModelReader implementation.- Specified by:
getModelReaderin interfaceSmallryeOpenApiProperties
-
getFilter
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the fully qualified name of the OASFilter implementation.- Specified by:
getFilterin interfaceSmallryeOpenApiProperties
-
getScanDisabled
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to disable annotation scanning.- Specified by:
getScanDisabledin interfaceSmallryeOpenApiProperties
-
getScanPackages
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the list of packages to scan.- Specified by:
getScanPackagesin interfaceSmallryeOpenApiProperties
-
getScanClasses
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the list of classes to scan.- Specified by:
getScanClassesin interfaceSmallryeOpenApiProperties
-
getScanExcludePackages
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the list of packages to exclude from scans.- Specified by:
getScanExcludePackagesin interfaceSmallryeOpenApiProperties
-
getScanExcludeClasses
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the list of classes to exclude from scans.- Specified by:
getScanExcludeClassesin interfaceSmallryeOpenApiProperties
-
getServers
Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify the list of global servers that provide connectivity information.- Specified by:
getServersin interfaceSmallryeOpenApiProperties
-
getPathServers
Description copied from interface:SmallryeOpenApiPropertiesPrefix of the configuration property to specify an alternative list of servers to service all operations in a path- Specified by:
getPathServersin interfaceSmallryeOpenApiProperties
-
getOperationServers
Description copied from interface:SmallryeOpenApiPropertiesPrefix of the configuration property to specify an alternative list of servers to service an operation.- Specified by:
getOperationServersin interfaceSmallryeOpenApiProperties
-
getCustomSchemaRegistryClass
Description copied from interface:SmallryeOpenApiPropertiesFully qualified name of a CustomSchemaRegistry, which can be used to specify a custom schema for a type.- Specified by:
getCustomSchemaRegistryClassin interfaceSmallryeOpenApiProperties
-
getApplicationPathDisable
Description copied from interface:SmallryeOpenApiPropertiesDisable scanning of the javax.ws.rs.Path (and jakarta.ws.rs.Path) for the application path.- Specified by:
getApplicationPathDisablein interfaceSmallryeOpenApiProperties
-
getOpenApiVersion
Description copied from interface:SmallryeOpenApiPropertiesTo specify a custom OpenAPI version.- Specified by:
getOpenApiVersionin interfaceSmallryeOpenApiProperties
-
getInfoTitle
- Specified by:
getInfoTitlein interfaceSmallryeOpenApiProperties
-
getInfoVersion
- Specified by:
getInfoVersionin interfaceSmallryeOpenApiProperties
-
getInfoDescription
- Specified by:
getInfoDescriptionin interfaceSmallryeOpenApiProperties
-
getInfoTermsOfService
- Specified by:
getInfoTermsOfServicein interfaceSmallryeOpenApiProperties
-
getInfoSummary
- Specified by:
getInfoSummaryin interfaceSmallryeOpenApiProperties
-
getInfoContactEmail
- Specified by:
getInfoContactEmailin interfaceSmallryeOpenApiProperties
-
getInfoContactName
- Specified by:
getInfoContactNamein interfaceSmallryeOpenApiProperties
-
getInfoContactUrl
- Specified by:
getInfoContactUrlin interfaceSmallryeOpenApiProperties
-
getInfoLicenseName
- Specified by:
getInfoLicenseNamein interfaceSmallryeOpenApiProperties
-
getInfoLicenseUrl
- Specified by:
getInfoLicenseUrlin interfaceSmallryeOpenApiProperties
-
getOperationIdStrategy
@Input @Optional public org.gradle.api.provider.Property<io.smallrye.openapi.api.OpenApiConfig.OperationIdStrategy> getOperationIdStrategy()Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify how the operationid is generated. Can be used to minimize risk of collisions between operations.- Specified by:
getOperationIdStrategyin interfaceSmallryeOpenApiProperties
-
getDuplicateOperationIdBehavior
@Input @Optional public org.gradle.api.provider.Property<io.smallrye.openapi.api.OpenApiConfig.DuplicateOperationIdBehavior> getDuplicateOperationIdBehavior()Description copied from interface:SmallryeOpenApiPropertiesConfiguration property to specify what should happen if duplicate operationIds occur.- Specified by:
getDuplicateOperationIdBehaviorin interfaceSmallryeOpenApiProperties
-
getScanProfiles
Description copied from interface:SmallryeOpenApiPropertiesProfiles which explicitly include operations. Any operation without a matching profile is excluded.- Specified by:
getScanProfilesin interfaceSmallryeOpenApiProperties
-
getScanExcludeProfiles
Description copied from interface:SmallryeOpenApiPropertiesProfiles which explicitly exclude operations. Any operation without a matching profile is included.- Specified by:
getScanExcludeProfilesin interfaceSmallryeOpenApiProperties
-
getScanResourceClasses
- Specified by:
getScanResourceClassesin interfaceSmallryeOpenApiProperties
-
getOutputFileTypeFilter
Description copied from interface:SmallryeOpenApiPropertiesFilter the type of files that will be generated, allowed values areALL,YAMLandJSON.- Specified by:
getOutputFileTypeFilterin interfaceSmallryeOpenApiProperties
-
getEncoding
Description copied from interface:SmallryeOpenApiPropertiesOutput encoding for openapi document.- Specified by:
getEncodingin interfaceSmallryeOpenApiProperties
-