@@ -882,20 +882,17 @@ class FlattenFields(BaseModel):
882
882
883
883
884
884
class KeyTransformation (BaseModel ):
885
- prefix : Optional [Union [str , None ]] = Field (
885
+ type : Literal ["KeyTransformation" ]
886
+ prefix : Optional [str ] = Field (
886
887
None ,
887
888
description = "Prefix to add for object keys. If not provided original keys remain unchanged." ,
888
- examples = [
889
- "flattened_" ,
890
- ],
889
+ examples = ["flattened_" ],
891
890
title = "Key Prefix" ,
892
891
)
893
- suffix : Optional [Union [ str , None ] ] = Field (
892
+ suffix : Optional [str ] = Field (
894
893
None ,
895
894
description = "Suffix to add for object keys. If not provided original keys remain unchanged." ,
896
- examples = [
897
- "_flattened" ,
898
- ],
895
+ examples = ["_flattened" ],
899
896
title = "Key Suffix" ,
900
897
)
901
898
@@ -918,7 +915,7 @@ class DpathFlattenFields(BaseModel):
918
915
description = "Whether to replace the origin record or not. Default is False." ,
919
916
title = "Replace Origin Record" ,
920
917
)
921
- key_transformation : Optional [Union [ KeyTransformation , None ] ] = Field (
918
+ key_transformation : Optional [KeyTransformation ] = Field (
922
919
None ,
923
920
description = "Transformation for object keys. If not provided, original key will be used." ,
924
921
title = "Key transformation" ,
@@ -2640,4 +2637,4 @@ class DynamicDeclarativeStream(BaseModel):
2640
2637
ParentStreamConfig .update_forward_refs ()
2641
2638
PropertiesFromEndpoint .update_forward_refs ()
2642
2639
SimpleRetriever .update_forward_refs ()
2643
- AsyncRetriever .update_forward_refs ()
2640
+ AsyncRetriever .update_forward_refs ()
0 commit comments