ConfigurationSpecificationSupplier

@Singleton
class ConfigurationSpecificationSupplier<T : ConfigurationSpecification>(micronautPropertiesFallback: T, @Value(value = "${airbyte.connector.config.json}") jsonPropertyValue: String? = null) : Supplier<T>

Supplies a valid T configuration POJO instance, based on the airbyte.connector.config Micronaut property values:

  • either airbyte.connector.config.json if it is set (typically by the CLI)

  • or the other, nested airbyte.connector.config.* properties (typically in unit tests)

One may wonder why we need to inject this Supplier instead of injecting the POJO directly. The reason is that injecting the POJO only works if the configuration values are set via the nested Micronaut properties (i.e. in unit tests). We could make direct injection work the same way as the ConfiguredCatalogFactory or the InputStateFactory (via a @Factory) but then we'd lose the ability to set values via the nested properties. This current design caters to both use cases. Furthermore, by deferring the parsing and validation of the configuration, we don't need to worry about exception handling edge cases when implementing the CHECK operation.

Constructors

Link copied to clipboard
constructor(micronautPropertiesFallback: T, @Value(value = "${airbyte.connector.config.json}") jsonPropertyValue: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val jsonSchema: JsonNode

Functions

Link copied to clipboard
open override fun get(): T