Skip to content

Commit

Permalink
fix(source-declarative-manifest): fix models (#45088)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Inzhyyants <[email protected]>
  • Loading branch information
artem1205 authored Sep 3, 2024
1 parent 6eb0d36 commit fa6aa2b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
from __future__ import annotations

import json
import os
import pkgutil
import sys
from pathlib import Path
from typing import List

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

Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit fa6aa2b

Please sign in to comment.