Class SourceGeneratorConfigBuilder

java.lang.Object
io.micronaut.jsonschema.generator.utils.SourceGeneratorConfigBuilder

public class SourceGeneratorConfigBuilder extends Object
A builder class for the SourceGeneratorConfig; encapsulating the configuration properties related to the input and output paths; file names; and URL.
Author:
Elif Kurtay
  • Constructor Details

    • SourceGeneratorConfigBuilder

      public SourceGeneratorConfigBuilder()
  • Method Details

    • build

      public SourceGeneratorConfig build()
      Returns:
      SourceGeneratorConfig
    • withInputStream

      public SourceGeneratorConfigBuilder withInputStream(InputStream inputStream)
      Adds the input stream config.
      Parameters:
      inputStream - Input stream of a json schema
      Returns:
      SourceGeneratorConfigBuilder
    • withJsonUrl

      public SourceGeneratorConfigBuilder withJsonUrl(String jsonUrl)
      Adds the URL of a json schema.
      Parameters:
      jsonUrl - URL of a json schema
      Returns:
      SourceGeneratorConfigBuilder
    • withJsonFile

      public SourceGeneratorConfigBuilder withJsonFile(File jsonFile)
      Adds the File of a json schema.
      Parameters:
      jsonFile - File of a json schema
      Returns:
      SourceGeneratorConfigBuilder
    • withInputFolder

      public SourceGeneratorConfigBuilder withInputFolder(Path inputFolder)
      Adds the input folder of json schema.
      Parameters:
      inputFolder - Input folder of json schema
      Returns:
      SourceGeneratorConfigBuilder
    • withOutputFolder

      public SourceGeneratorConfigBuilder withOutputFolder(Path outputFolder)
      Adds the Output path for the generated files.
      Parameters:
      outputFolder - Output path for the generated files
      Returns:
      SourceGeneratorConfigBuilder
    • withOutputPackageName

      public SourceGeneratorConfigBuilder withOutputPackageName(String outputPackageName)
      Adds the Package name for generated files.
      Parameters:
      outputPackageName - Package name for generated files
      Returns:
      SourceGeneratorConfigBuilder
    • withOutputFileName

      public SourceGeneratorConfigBuilder withOutputFileName(String outputFileName)
      Adds the desired file name for single generations.
      Parameters:
      outputFileName - desired file name for single generations
      Returns:
      SourceGeneratorConfigBuilder