Interface OpenApiClientSpec

All Superinterfaces:
OpenApiSpec

public interface OpenApiClientSpec extends OpenApiSpec
  • Method Details

    • getClientId

      org.gradle.api.provider.Property<String> getClientId()
      The Micronaut HTTP client id to place on generated client declarations.

      The generator uses this value for the generated @Client identifier. Leave it unset when the generated client should use the default target derived by the Micronaut OpenAPI generator.

      Returns:
      the generated Micronaut client id
    • getClientPath

      org.gradle.api.provider.Property<Boolean> getClientPath()
      Whether the generated @Client declaration should use a configurable path expression instead of only the OpenAPI server URL.

      Defaults to false. Enable this when the generated client base path should be externalized to Micronaut configuration.

      Returns:
      whether to generate a configurable client path
    • getUseAuth

      org.gradle.api.provider.Property<Boolean> getUseAuth()
      Whether to generate client authorization support for OpenAPI security requirements.

      Defaults to false. When enabled, generated sources may import Micronaut Security and Reactor types. The Gradle plugin configures code generation, but applications must still add the Micronaut Security modules required by the generated auth classes.

      Returns:
      whether client authorization support is generated
    • getBasePathSeparator

      org.gradle.api.provider.Property<String> getBasePathSeparator()
      Separator used when deriving generated client base-path configuration keys.

      Defaults to ".".

      Returns:
      the separator for generated client path property names
    • getAdditionalClientTypeAnnotations

      org.gradle.api.provider.ListProperty<String> getAdditionalClientTypeAnnotations()
      Additional annotations to place on generated client types.

      Use fully qualified annotation names when imports would otherwise be ambiguous.

      Returns:
      annotations added to generated client classes or interfaces
    • getGenerateAuthClasses

      org.gradle.api.provider.Property<Boolean> getGenerateAuthClasses()
      Whether to generate reusable authorization support classes.

      Defaults to true. This option only has an effect when getUseAuth() is enabled.

      Returns:
      whether auth support classes are generated
    • getAuthFilter

      org.gradle.api.provider.Property<Boolean> getAuthFilter()
      Whether to generate a Micronaut client authorization filter.

      Defaults to true. This option only has an effect when getUseAuth() is enabled. Use the filter pattern and client-id properties to scope the generated filter.

      Returns:
      whether an authorization filter is generated
    • getUseOauth

      org.gradle.api.provider.Property<Boolean> getUseOauth()
      Whether generated authorization support should include OAuth flows.

      Defaults to true. The generated code can require Micronaut Security OAuth dependencies when this remains enabled and the OpenAPI definition declares OAuth security requirements.

      Returns:
      whether OAuth auth support is generated
    • getUseBasicAuth

      org.gradle.api.provider.Property<Boolean> getUseBasicAuth()
      Whether generated authorization support should include HTTP Basic auth.

      Defaults to true. This option only has an effect when getUseAuth() is enabled.

      Returns:
      whether Basic auth support is generated
    • getUseApiKeyAuth

      org.gradle.api.provider.Property<Boolean> getUseApiKeyAuth()
      Whether generated authorization support should include API key auth.

      Defaults to true. This option only has an effect when getUseAuth() is enabled.

      Returns:
      whether API key auth support is generated
    • getAuthorizationFilterPattern

      org.gradle.api.provider.Property<String> getAuthorizationFilterPattern()
      Request pattern used by the generated authorization filter.

      Leave unset to use the generator default. Set this when the generated filter must apply only to a subset of requests.

      Returns:
      the generated authorization filter pattern
    • getAuthorizationFilterPatternStyle

      org.gradle.api.provider.Property<String> getAuthorizationFilterPatternStyle()
      Pattern style used by the generated authorization filter.

      Leave unset to use the generator default for the selected generator version.

      Returns:
      the generated authorization filter pattern style
    • getAuthFilterClientIds

      org.gradle.api.provider.ListProperty<String> getAuthFilterClientIds()
      Client ids included by the generated authorization filter.

      Use this to restrict generated auth filter behavior to specific Micronaut client ids.

      Returns:
      client ids included by the generated auth filter
    • getAuthFilterExcludedClientIds

      org.gradle.api.provider.ListProperty<String> getAuthFilterExcludedClientIds()
      Client ids excluded by the generated authorization filter.

      Use this when the generated auth filter should apply broadly except for specific Micronaut client ids.

      Returns:
      client ids excluded by the generated auth filter
    • getAuthConfigName

      org.gradle.api.provider.Property<String> getAuthConfigName()
      Configuration name used by generated authorization support.

      Leave unset to use the generator default. Set this when generated auth code should read a named Micronaut auth configuration.

      Returns:
      the generated auth configuration name