Skip to content
Merged
Show file tree
Hide file tree
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 @@ -283,13 +283,6 @@ def _validate_source(self) -> None:
f"Failed to read manifest component json schema required for validation: {e}"
)

streams = self._source_config.get("streams")
dynamic_streams = self._source_config.get("dynamic_streams")
if not (streams or dynamic_streams):
raise ValidationError(
f"A valid manifest should have at least one stream defined. Got {streams}"
)

try:
validate(self._source_config, declarative_component_schema)
except ValidationError as e:
Expand Down
40 changes: 0 additions & 40 deletions unit_tests/sources/declarative/test_manifest_declarative_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,46 +1015,6 @@ def test_source_with_no_external_spec_and_no_in_yaml_spec_fails(self):
with pytest.raises(FileNotFoundError):
source.spec(logger)

def test_manifest_without_at_least_one_stream(self):
manifest = {
"version": "0.29.3",
"definitions": {
"schema_loader": {
"name": "{{ parameters.stream_name }}",
"file_path": "./source_sendgrid/schemas/{{ parameters.name }}.yaml",
},
"retriever": {
"paginator": {
"type": "DefaultPaginator",
"page_size": 10,
"page_size_option": {
"type": "RequestOption",
"inject_into": "request_body",
"field_path": ["variables", "page_size"],
},
"page_token_option": {"type": "RequestPath"},
"pagination_strategy": {
"type": "CursorPagination",
"cursor_value": "{{ response._metadata.next }}",
},
},
"requester": {
"path": "/v3/marketing/lists",
"authenticator": {
"type": "BearerAuthenticator",
"api_token": "{{ config.apikey }}",
},
"request_parameters": {"page_size": 10},
},
"record_selector": {"extractor": {"field_path": ["result"]}},
},
},
"streams": [],
"check": {"type": "CheckStream", "stream_names": ["lists"]},
}
with pytest.raises(ValidationError):
ManifestDeclarativeSource(source_config=manifest)

@patch("airbyte_cdk.sources.declarative.declarative_source.DeclarativeSource.read")
def test_given_debug_when_read_then_set_log_level(self, declarative_source_read):
any_valid_manifest = {
Expand Down
Loading