Skip to content

fix(source-declarative-manifest): fix models #45088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading