diff --git a/airbyte_cdk/sources/declarative/declarative_component_schema.yaml b/airbyte_cdk/sources/declarative/declarative_component_schema.yaml index 114a7d877..3e2622ae6 100644 --- a/airbyte_cdk/sources/declarative/declarative_component_schema.yaml +++ b/airbyte_cdk/sources/declarative/declarative_component_schema.yaml @@ -3398,6 +3398,7 @@ definitions: description: Array of paths defining the field to remove. Each item is an array whose field describe the path of a field to remove. type: array items: + type: array items: type: string examples: @@ -4546,6 +4547,7 @@ definitions: description: A list of field pointers to be removed from the config. type: array items: + type: array items: type: string examples: diff --git a/airbyte_cdk/sources/declarative/models/declarative_component_schema.py b/airbyte_cdk/sources/declarative/models/declarative_component_schema.py index 42f84bf2b..cca08224b 100644 --- a/airbyte_cdk/sources/declarative/models/declarative_component_schema.py +++ b/airbyte_cdk/sources/declarative/models/declarative_component_schema.py @@ -1,5 +1,3 @@ -# Copyright (c) 2025 Airbyte, Inc., all rights reserved. - # generated by datamodel-codegen: # filename: declarative_component_schema.yaml @@ -160,20 +158,6 @@ class Config: parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters") -class CustomConfigTransformation(BaseModel): - class Config: - extra = Extra.allow - - type: Literal["CustomConfigTransformation"] - class_name: str = Field( - ..., - description="Fully-qualified name of the class that will be implementing the custom config transformation. The format is `source_..`.", - examples=["source_declarative_manifest.components.MyCustomConfigTransformation"], - title="Class Name", - ) - parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters") - - class CustomErrorHandler(BaseModel): class Config: extra = Extra.allow @@ -1657,6 +1641,20 @@ class ConfigRemoveFields(BaseModel): ) +class CustomConfigTransformation(BaseModel): + type: Literal["CustomConfigTransformation"] + class_name: str = Field( + ..., + description="Fully-qualified name of the class that will be implementing the custom config transformation. The format is `source_..`.", + examples=["source_declarative_manifest.components.MyCustomConfigTransformation"], + ) + parameters: Optional[Dict[str, Any]] = Field( + None, + alias="$parameters", + description="Additional parameters to be passed to the custom config transformation.", + ) + + class AddedFieldDefinition(BaseModel): type: Literal["AddedFieldDefinition"] path: List[str] = Field( @@ -2164,7 +2162,12 @@ class ConfigMigration(BaseModel): None, description="The description/purpose of the config migration." ) transformations: List[ - Union[ConfigRemapField, ConfigAddFields, ConfigRemoveFields, CustomConfigTransformation] + Union[ + ConfigRemapField, + ConfigAddFields, + ConfigRemoveFields, + CustomConfigTransformation, + ] ] = Field( ..., description="The list of transformations that will attempt to be applied on an incoming unmigrated config. The transformations will be applied in the order they are defined.", @@ -2184,7 +2187,12 @@ class Config: ) transformations: Optional[ List[ - Union[ConfigRemapField, ConfigAddFields, ConfigRemoveFields, CustomConfigTransformation] + Union[ + ConfigRemapField, + ConfigAddFields, + ConfigRemoveFields, + CustomConfigTransformation, + ] ] ] = Field( [],