Record Class SchemaDiscoveryContext
java.lang.Object
java.lang.Record
io.micronaut.jsonschema.generator.discovery.SchemaDiscoveryContext
- Record Components:
skipOnError- Whether per-object failures should be skippedfailOnMissingSource- Whether unavailable configured sources should fail the buildschemaCacheDir- Discovery schema cache directoryoutputDir- Generated source output directorysourceMetadata- Sanitized provider source metadata available to the providerlogger- Logger for diagnosticsjdbcConnectionProvider- JDBC connection provider for JDBC-backed discovery providers
public record SchemaDiscoveryContext(boolean skipOnError, boolean failOnMissingSource, Path schemaCacheDir, Path outputDir, Map<String,String> sourceMetadata, JsonSchemaRecordsLogger logger, JdbcConnectionProvider jdbcConnectionProvider)
extends Record
Execution context passed to schema discovery providers.
- Since:
- 2.2.0
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaDiscoveryContext(boolean skipOnError, boolean failOnMissingSource, Path schemaCacheDir, Path outputDir, Map<String, String> sourceMetadata, JsonSchemaRecordsLogger logger, JdbcConnectionProvider jdbcConnectionProvider) Create a schema discovery context. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefailOnMissingSourcerecord component.Resolve the JDBC connection provider when the configured discovery provider needs JDBC.final inthashCode()Returns a hash code value for this object.Returns the value of thejdbcConnectionProviderrecord component.logger()Returns the value of theloggerrecord component.Returns the value of theoutputDirrecord component.Resolve the JDBC connection provider required by JDBC-backed discovery providers.Returns the value of theschemaCacheDirrecord component.booleanReturns the value of theskipOnErrorrecord component.Returns the value of thesourceMetadatarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SchemaDiscoveryContext
public SchemaDiscoveryContext(boolean skipOnError, boolean failOnMissingSource, Path schemaCacheDir, Path outputDir, Map<String, String> sourceMetadata, JsonSchemaRecordsLogger logger, JdbcConnectionProvider jdbcConnectionProvider) Create a schema discovery context.- Parameters:
skipOnError- Whether per-object failures should be skippedfailOnMissingSource- Whether unavailable configured sources should fail the buildschemaCacheDir- Discovery schema cache directoryoutputDir- Generated source output directorysourceMetadata- Sanitized provider source metadata available to the providerlogger- Logger for diagnosticsjdbcConnectionProvider- JDBC connection provider for JDBC-backed discovery providers
-
-
Method Details
-
findJdbcConnectionProvider
Resolve the JDBC connection provider when the configured discovery provider needs JDBC.- Returns:
- The JDBC connection provider when present
-
requireJdbcConnectionProvider
Resolve the JDBC connection provider required by JDBC-backed discovery providers.- Returns:
- The JDBC connection provider
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
skipOnError
public boolean skipOnError()Returns the value of theskipOnErrorrecord component.- Returns:
- the value of the
skipOnErrorrecord component
-
failOnMissingSource
public boolean failOnMissingSource()Returns the value of thefailOnMissingSourcerecord component.- Returns:
- the value of the
failOnMissingSourcerecord component
-
schemaCacheDir
Returns the value of theschemaCacheDirrecord component.- Returns:
- the value of the
schemaCacheDirrecord component
-
outputDir
-
sourceMetadata
Returns the value of thesourceMetadatarecord component.- Returns:
- the value of the
sourceMetadatarecord component
-
logger
-
jdbcConnectionProvider
Returns the value of thejdbcConnectionProviderrecord component.- Returns:
- the value of the
jdbcConnectionProviderrecord component
-