Skip to content

Commit baf1058

Browse files
author
Oleksandr Bazarnov
committed
updated models
1 parent 2448d37 commit baf1058

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

airbyte_cdk/sources/declarative/models/declarative_component_schema.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -882,20 +882,17 @@ class FlattenFields(BaseModel):
882882

883883

884884
class KeyTransformation(BaseModel):
885-
prefix: Optional[Union[str, None]] = Field(
885+
type: Literal["KeyTransformation"]
886+
prefix: Optional[str] = Field(
886887
None,
887888
description="Prefix to add for object keys. If not provided original keys remain unchanged.",
888-
examples=[
889-
"flattened_",
890-
],
889+
examples=["flattened_"],
891890
title="Key Prefix",
892891
)
893-
suffix: Optional[Union[str, None]] = Field(
892+
suffix: Optional[str] = Field(
894893
None,
895894
description="Suffix to add for object keys. If not provided original keys remain unchanged.",
896-
examples=[
897-
"_flattened",
898-
],
895+
examples=["_flattened"],
899896
title="Key Suffix",
900897
)
901898

@@ -918,7 +915,7 @@ class DpathFlattenFields(BaseModel):
918915
description="Whether to replace the origin record or not. Default is False.",
919916
title="Replace Origin Record",
920917
)
921-
key_transformation: Optional[Union[KeyTransformation, None]] = Field(
918+
key_transformation: Optional[KeyTransformation] = Field(
922919
None,
923920
description="Transformation for object keys. If not provided, original key will be used.",
924921
title="Key transformation",
@@ -2640,4 +2637,4 @@ class DynamicDeclarativeStream(BaseModel):
26402637
ParentStreamConfig.update_forward_refs()
26412638
PropertiesFromEndpoint.update_forward_refs()
26422639
SimpleRetriever.update_forward_refs()
2643-
AsyncRetriever.update_forward_refs()
2640+
AsyncRetriever.update_forward_refs()

0 commit comments

Comments
 (0)