From fa6aa2b62c1e2018459df3b8bfa9f65e7a95be53 Mon Sep 17 00:00:00 2001 From: Artem Inzhyyants <36314070+artem1205@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:13:43 +0200 Subject: [PATCH] fix(source-declarative-manifest): fix models (#45088) Signed-off-by: Artem Inzhyyants --- .../source_declarative_manifest/run.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-declarative-manifest/source_declarative_manifest/run.py b/airbyte-integrations/connectors/source-declarative-manifest/source_declarative_manifest/run.py index feb3f64b410f..4ef4c1908425 100644 --- a/airbyte-integrations/connectors/source-declarative-manifest/source_declarative_manifest/run.py +++ b/airbyte-integrations/connectors/source-declarative-manifest/source_declarative_manifest/run.py @@ -4,7 +4,6 @@ from __future__ import annotations import json -import os import pkgutil import sys from pathlib import Path @@ -12,7 +11,7 @@ from airbyte_cdk.connector import BaseConnector from airbyte_cdk.entrypoint import AirbyteEntrypoint, launch -from airbyte_cdk.models import AirbyteMessage, ConnectorSpecification, Type +from airbyte_cdk.models import AirbyteMessage, ConnectorSpecificationSerializer, Type from airbyte_cdk.sources.declarative.manifest_declarative_source import ManifestDeclarativeSource from airbyte_cdk.sources.declarative.yaml_declarative_source import YamlDeclarativeSource @@ -64,7 +63,7 @@ def handle_remote_manifest_command(args: List[str]) -> None: if args[0] == "spec": json_spec = pkgutil.get_data("source_declarative_manifest", "spec.json") spec_obj = json.loads(json_spec) - spec = ConnectorSpecification.parse_obj(spec_obj) + spec = ConnectorSpecificationSerializer.load(spec_obj) message = AirbyteMessage(type=Type.SPEC, spec=spec) print(AirbyteEntrypoint.airbyte_message_to_string(message))