Record Class JsonSchemaRecordsGeneration
java.lang.Object
java.lang.Record
io.micronaut.jsonschema.generator.records.JsonSchemaRecordsGeneration
- Record Components:
jdbcUrl- JDBC URLusername- Database usernamepassword- Database passwordtargetPackage- Target package for generated sourceslanguageLevel- Java language level used for generated Java sourcesschemaCacheDir- Directory where discovered schemas are cachedoutputDir- Directory where sources are generatedsources- Configured schema discovery sourcesskipOnError- Whether per-object discovery and generation failures should be skippedfailOnMissingSource- Whether unavailable configured sources should fail the buildlanguage- Generated source language
public record JsonSchemaRecordsGeneration(String jdbcUrl, String username, String password, String targetPackage, Integer languageLevel, File schemaCacheDir, File outputDir, List<Map<String,Object>> sources, Boolean skipOnError, Boolean failOnMissingSource, String language)
extends Record
Shared build-plugin task definition for JSON Schema discovery and source generation.
- Since:
- 2.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionJsonSchemaRecordsGeneration(String jdbcUrl, String username, String password, String targetPackage, Integer languageLevel, File schemaCacheDir, File outputDir, List<Map<String, Object>> sources, Boolean skipOnError, Boolean failOnMissingSource) Create a Java generation task definition.JsonSchemaRecordsGeneration(String jdbcUrl, String username, String password, String targetPackage, Integer languageLevel, File schemaCacheDir, File outputDir, List<Map<String, Object>> sources, Boolean skipOnError, Boolean failOnMissingSource, String language) Create a normalized generation task definition. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailOnMissingSourcerecord component.voidgenerate()voidgenerate(JsonSchemaRecordsLogger logger, ClassLoader providerClassLoader) Execute generation with build-tool-specific services.final inthashCode()Returns a hash code value for this object.jdbcUrl()Returns the value of thejdbcUrlrecord component.language()Returns the value of thelanguagerecord component.Returns the value of thelanguageLevelrecord component.Returns the value of theoutputDirrecord component.password()Returns the value of thepasswordrecord component.Returns the value of theschemaCacheDirrecord component.Returns the value of theskipOnErrorrecord component.sources()Returns the value of thesourcesrecord component.Returns the value of thetargetPackagerecord component.Convert this task definition to the generator configuration.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
JsonSchemaRecordsGeneration
public JsonSchemaRecordsGeneration(String jdbcUrl, String username, String password, String targetPackage, Integer languageLevel, File schemaCacheDir, File outputDir, List<Map<String, Object>> sources, Boolean skipOnError, Boolean failOnMissingSource) Create a Java generation task definition.- Parameters:
jdbcUrl- JDBC URLusername- Database usernamepassword- Database passwordtargetPackage- Target package for generated sourceslanguageLevel- Java language level used for generated Java sourcesschemaCacheDir- Directory where discovered schemas are cachedoutputDir- Directory where sources are generatedsources- Configured schema discovery sourcesskipOnError- Whether per-object discovery and generation failures should be skippedfailOnMissingSource- Whether unavailable configured sources should fail the build
-
JsonSchemaRecordsGeneration
public JsonSchemaRecordsGeneration(String jdbcUrl, String username, String password, String targetPackage, Integer languageLevel, File schemaCacheDir, File outputDir, List<Map<String, Object>> sources, Boolean skipOnError, Boolean failOnMissingSource, String language) Create a normalized generation task definition.- Parameters:
jdbcUrl- JDBC URLusername- Database usernamepassword- Database passwordtargetPackage- Target package for generated sourceslanguageLevel- Java language level used for generated Java sourcesschemaCacheDir- Directory where discovered schemas are cachedoutputDir- Directory where sources are generatedsources- Configured schema discovery sourcesskipOnError- Whether per-object discovery and generation failures should be skippedfailOnMissingSource- Whether unavailable configured sources should fail the buildlanguage- Generated source language
-
-
Method Details
-
generate
public void generate() -
generate
public void generate(JsonSchemaRecordsLogger logger, ClassLoader providerClassLoader) throws Exception Execute generation with build-tool-specific services.- Parameters:
logger- The logger to useproviderClassLoader- The classloader used to resolve discovery providers- Throws:
Exception- If generation fails
-
toGeneratorConfig
Convert this task definition to the generator configuration.- Returns:
- The generator configuration
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
jdbcUrl
-
username
-
password
-
targetPackage
Returns the value of thetargetPackagerecord component.- Returns:
- the value of the
targetPackagerecord component
-
languageLevel
Returns the value of thelanguageLevelrecord component.- Returns:
- the value of the
languageLevelrecord component
-
schemaCacheDir
Returns the value of theschemaCacheDirrecord component.- Returns:
- the value of the
schemaCacheDirrecord component
-
outputDir
-
sources
-
skipOnError
Returns the value of theskipOnErrorrecord component.- Returns:
- the value of the
skipOnErrorrecord component
-
failOnMissingSource
Returns the value of thefailOnMissingSourcerecord component.- Returns:
- the value of the
failOnMissingSourcerecord component
-
language
-