Skip to content

Commit 0f413ad

Browse files
committed
cherry-pick-me: add missing serializer classes
1 parent 1a8ee4c commit 0f413ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

airbyte_cdk/models/airbyte_protocol_serializers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
from serpyco_rs import CustomType, Serializer
55

66
from .airbyte_protocol import ( # type: ignore[attr-defined] # all classes are imported to airbyte_protocol via *
7+
AirbyteCatalog,
78
AirbyteMessage,
89
AirbyteStateBlob,
910
AirbyteStateMessage,
11+
AirbyteStream,
1012
AirbyteStreamState,
1113
ConfiguredAirbyteCatalog,
1214
ConfiguredAirbyteStream,
@@ -30,6 +32,8 @@ def custom_type_resolver(t: type) -> CustomType[AirbyteStateBlob, Dict[str, Any]
3032
return AirbyteStateBlobType() if t is AirbyteStateBlob else None
3133

3234

35+
AirbyteCatalogSerializer = Serializer(AirbyteCatalog, omit_none=True)
36+
AirbyteStreamSerializer = Serializer(AirbyteStream, omit_none=True)
3337
AirbyteStreamStateSerializer = Serializer(
3438
AirbyteStreamState, omit_none=True, custom_type_resolver=custom_type_resolver
3539
)

0 commit comments

Comments
 (0)