Interface ContractParameters
- All Superinterfaces:
org.gradle.workers.WorkParameters
- All Known Subinterfaces:
GenerateContractSourcesAction.Parameters,GenerateEmitterSourcesAction.Parameters
public interface ContractParameters
extends org.gradle.workers.WorkParameters
What a generation worker derives the contract's model from.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.workers.WorkParameters
org.gradle.workers.WorkParameters.None -
Method Summary
Modifier and TypeMethodDescriptiondefault Generation.DerivationDerives the contract's model, class names and cases.org.gradle.api.file.ConfigurableFileCollectionThe contract's AsyncAPI document, or nothing when it has none.org.gradle.api.provider.Property<String> The base package.org.gradle.api.file.RegularFilePropertyThe fetched contract document.org.gradle.api.provider.Property<String> The contract's name.org.gradle.api.provider.Property<String> The locked hash.org.gradle.api.provider.Property<String> The locked version.org.gradle.api.provider.ListProperty<String> The kinds of contract case derived.org.gradle.api.provider.Property<String> The base name of the bundle descriptions resolve through, or absent when the project supplies none.org.gradle.api.provider.Property<String> The description placeholder.org.gradle.api.provider.Property<Boolean> Whether descriptions come from the contract.org.gradle.api.provider.Property<String> The status that means "the request is invalid".org.gradle.api.provider.Property<Integer> The recursion depth.org.gradle.api.provider.Property<Boolean> Whether an undeclaredadditionalPropertiesforbids unknown members.org.gradle.api.provider.ListProperty<String> The formats an invalid-request case is derived for.default SettingsThe settings these parameters describe, with the options of the emitters given.static voidWrites a UTF-8 text file, creating its directory.
-
Method Details
-
getContract
org.gradle.api.file.RegularFileProperty getContract()The fetched contract document.- Returns:
- the document
-
getAsyncContract
org.gradle.api.file.ConfigurableFileCollection getAsyncContract()The contract's AsyncAPI document, or nothing when it has none.- Returns:
- the document
-
getContractVersion
org.gradle.api.provider.Property<String> getContractVersion()The locked version.- Returns:
- the version
-
getContractSha256
org.gradle.api.provider.Property<String> getContractSha256()The locked hash.- Returns:
- the hash
-
getContractName
org.gradle.api.provider.Property<String> getContractName()The contract's name.- Returns:
- the name
-
getBasePackage
org.gradle.api.provider.Property<String> getBasePackage()The base package.- Returns:
- the package
-
getRecursionDepth
org.gradle.api.provider.Property<Integer> getRecursionDepth()The recursion depth.- Returns:
- the depth
-
getGenerateDocs
org.gradle.api.provider.Property<Boolean> getGenerateDocs()Whether descriptions come from the contract.- Returns:
- the setting
-
getDescriptionPlaceholder
org.gradle.api.provider.Property<String> getDescriptionPlaceholder()The description placeholder.- Returns:
- the placeholder
-
getDescriptionBundle
org.gradle.api.provider.Property<String> getDescriptionBundle()The base name of the bundle descriptions resolve through, or absent when the project supplies none.- Returns:
- the bundle's base name
-
getInvalidRequestStatus
org.gradle.api.provider.Property<String> getInvalidRequestStatus()The status that means "the request is invalid".- Returns:
- the status
-
getStrictRequests
org.gradle.api.provider.Property<Boolean> getStrictRequests()Whether an undeclaredadditionalPropertiesforbids unknown members.- Returns:
- the setting
-
getValidateFormats
org.gradle.api.provider.ListProperty<String> getValidateFormats()The formats an invalid-request case is derived for.- Returns:
- the format names
-
getDerive
org.gradle.api.provider.ListProperty<String> getDerive()The kinds of contract case derived.- Returns:
- the kinds, by their setting names
-
settings
The settings these parameters describe, with the options of the emitters given.- Parameters:
emitterOptions- each emitter's options, by id- Returns:
- the settings
-
derive
Derives the contract's model, class names and cases.- Parameters:
settings- the settings- Returns:
- the derivation
-
write
Writes a UTF-8 text file, creating its directory.- Parameters:
file- the filecontent- the text
-