Record Class SourceGeneratorConfig

java.lang.Object
java.lang.Record
io.micronaut.jsonschema.generator.utils.SourceGeneratorConfig
Record Components:
inputStream - The Input Stream of the JSON schema to be processed.
jsonUrl - The URL of the JSON schema file to be downloaded or processed.
jsonFile - The JSON schema file, typically ending in .schema.json.
inputFolder - The path to the folder where the input files (JSON schemas) are located.
outputPath - The path where generated source files will be saved. This is a required field. The path should be a valid, writable directory path.
outputPackageName - The package name to be applied to the generated source files. This field is optional and can be null if no package name is needed.
outputFileName - The name of the file where the generated source code will be written. This field is optional.
javadoc - Configuration specific to Javadoc.
recordAdoptionStrategy - Strategy specifying when to generate records vs classes. Defaults to preferring records.

public record SourceGeneratorConfig(InputStream inputStream, String jsonUrl, File jsonFile, Path inputFolder, Path outputPath, String outputPackageName, String outputFileName, SourceGeneratorConfig.JavadocConfig javadoc, SourceGeneratorConfig.RecordAdoptionStrategy recordAdoptionStrategy) extends Record
A configuration class for the JSON schema source generator, encapsulating the configuration properties related to the input and output paths, file names, and URL. This class is used to specify:
  1. The URL of the JSON schema file to be processed (jsonUrl)
  2. The name of the JSON schema file (jsonFileName)
  3. The input folder where schema files might be located (inputFolder)
  4. The output directory for generated source files (outputPath)
  5. The package name to be applied to the generated source files (outputPackageName)
  6. The output file name for the generated source (outputFileName)
Author:
Elif Kurtay
  • Constructor Details

  • Method Details

    • getInputName

      public String getInputName()
    • toBuilder

      public SourceGeneratorConfigBuilder toBuilder()
      Convert this configuration to builder.
      Returns:
      The builder
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • inputStream

      public InputStream inputStream()
      Returns the value of the inputStream record component.
      Returns:
      the value of the inputStream record component
    • jsonUrl

      public String jsonUrl()
      Returns the value of the jsonUrl record component.
      Returns:
      the value of the jsonUrl record component
    • jsonFile

      public File jsonFile()
      Returns the value of the jsonFile record component.
      Returns:
      the value of the jsonFile record component
    • inputFolder

      public Path inputFolder()
      Returns the value of the inputFolder record component.
      Returns:
      the value of the inputFolder record component
    • outputPath

      public Path outputPath()
      Returns the value of the outputPath record component.
      Returns:
      the value of the outputPath record component
    • outputPackageName

      public String outputPackageName()
      Returns the value of the outputPackageName record component.
      Returns:
      the value of the outputPackageName record component
    • outputFileName

      public String outputFileName()
      Returns the value of the outputFileName record component.
      Returns:
      the value of the outputFileName record component
    • javadoc

      Returns the value of the javadoc record component.
      Returns:
      the value of the javadoc record component
    • recordAdoptionStrategy

      public SourceGeneratorConfig.RecordAdoptionStrategy recordAdoptionStrategy()
      Returns the value of the recordAdoptionStrategy record component.
      Returns:
      the value of the recordAdoptionStrategy record component