Class JetOpenApiAnnotationsExtension

java.lang.Object
net.jacobpeterson.jet.openapiannotationsplugin.JetOpenApiAnnotationsExtension

@NullMarked public abstract class JetOpenApiAnnotationsExtension extends Object
  • Constructor Details

    • JetOpenApiAnnotationsExtension

      public JetOpenApiAnnotationsExtension()
  • Method Details

    • getAnnotatedClasspaths

      public abstract org.gradle.api.file.ConfigurableFileCollection getAnnotatedClasspaths()
      For the JetOpenApiAnnotationsTask, the classpath files to load into a ClassLoader that should be scanned for OpenApi annotations. Can be JAR files or a directories containing .class files, but only .class files will be scanned for OpenApi annotations. The classes inside JAR files will not be scanned.

      Defaults to DefaultTask.getOutputs().

    • getClasspaths

      public abstract org.gradle.api.file.ConfigurableFileCollection getClasspaths()
      For the JetOpenApiAnnotationsTask, the classpaths to load into a ClassLoader for dependency classes used in fields that OpenApiSchema.fromClass(). Can be JAR files or directories containing .class files. These classpaths will not be scanned for OpenApi annotations.

      Defaults to JavaCompile.getClasspath().

    • getSchemaGeneratorConfigBuilderProvider

      public abstract org.gradle.api.provider.Property<SchemaGeneratorConfigBuilderProvider> getSchemaGeneratorConfigBuilderProvider()
    • getSchemaGeneratorUseNullableModule

      public abstract org.gradle.api.provider.Property<Boolean> getSchemaGeneratorUseNullableModule()
      For the JetOpenApiAnnotationsTask, set to true to use the NullableSchemaModule, set to false otherwise.

      Defaults to true.

    • getSchemaGeneratorUseSchemaNameModule

      public abstract org.gradle.api.provider.Property<Boolean> getSchemaGeneratorUseSchemaNameModule()
      For the JetOpenApiAnnotationsTask, set to true to use the SchemaNameSchemaModule, set to false otherwise.

      Defaults to true.

    • getSchemaGeneratorUseGsonModule

      public abstract org.gradle.api.provider.Property<Boolean> getSchemaGeneratorUseGsonModule()
      For the JetOpenApiAnnotationsTask, set to true to use GsonSchemaModule the, set to false otherwise.

      Defaults to false.

    • getSchemaGeneratorUseJacksonModule

      public abstract org.gradle.api.provider.Property<Boolean> getSchemaGeneratorUseJacksonModule()
      For the JetOpenApiAnnotationsTask, set to true to use the JacksonSchemaModule, set to false otherwise.

      Defaults to false.

    • getSchemaGeneratorSimpleTypeMappings

      public abstract org.gradle.api.provider.MapProperty<String,String> getSchemaGeneratorSimpleTypeMappings()
      For the JetOpenApiAnnotationsTask, a Map containing simple type mappings with the fully qualified class name as the key and the raw JSON schema as the value.
    • getGenerateOperationId

      public abstract org.gradle.api.provider.Property<Boolean> getGenerateOperationId()
      For the JetOpenApiAnnotationsTask, set to true to, if not already provided, generate OpenApiOperation.operationId() by concatenating OpenApiPathItem.methods() with the lower-camelcase conversion of the path segments of OpenApiPathItem.MapEntry.key() after the index of OpenApiOperation.tags(). For example, if method is POST, path item key is /account/create, and tag is account, then the generated operation ID is postCreate. For many OpenAPI generated clients, this results in intuitively-named method calls, for example: account.postCreate(...).

      Defaults to true.

    • getMoveClassSchemasToComponents

      public abstract org.gradle.api.provider.Property<Boolean> getMoveClassSchemasToComponents()
      For the JetOpenApiAnnotationsTask, set to true to move the JSON schema generated from OpenApiSchema.fromClass() to OpenApiComponents.schemas(), set to false otherwise.

      Defaults to true.

    • getSchemaValidation

      public abstract org.gradle.api.provider.Property<Boolean> getSchemaValidation()
      For the JetOpenApiAnnotationsTask, set to true to validate the OpenAPI specification JSON output generated from OpenApi annotations using supported OpenAPI JSON schemas (see OpenApi public constants starting with $SCHEMA_), set to false otherwise.

      Defaults to true.

    • getOutputDirectory

      public abstract org.gradle.api.file.DirectoryProperty getOutputDirectory()
    • getOutputDirectoryIncludeInJar

      public abstract org.gradle.api.provider.Property<Boolean> getOutputDirectoryIncludeInJar()
      Set to true to include the getOutputDirectory() in each Jar Task, set to false otherwise.

      Defaults to true.