Skip to content

Commit

Permalink
Merge pull request #915 from chrisbonilla95/cbon-lx-669-declarative-d…
Browse files Browse the repository at this point in the history
…atasource-fix

fix: client_id was missing from declarative data source
  • Loading branch information
chrisbonilla95 authored Nov 28, 2024
2 parents d6f31b3 + 92444d5 commit 291028f
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ class CatalogDeclarativeDataSource(Base):
parameters: Optional[list[CatalogParameter]] = None
decoded_parameters: Optional[list[CatalogParameter]] = None
permissions: list[CatalogDeclarativeDataSourcePermission] = attr.field(factory=list)
client_id: Optional[str] = None

def to_test_request(
self,
password: Optional[str] = None,
token: Optional[str] = None,
private_key: Optional[str] = None,
private_key_passphrase: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
) -> TestDefinitionRequest:
kwargs: dict[str, Any] = {"schema": self.schema}
Expand All @@ -125,8 +125,6 @@ def to_test_request(
kwargs["private_key"] = private_key
if private_key_passphrase is not None:
kwargs["private_key_passphrase"] = private_key
if client_id is not None:
kwargs["client_id"] = client_id
if client_secret is not None:
kwargs["client_secret"] = client_secret
return TestDefinitionRequest(type=self.type, url=self.url, **kwargs)
Expand All @@ -147,7 +145,6 @@ def to_api(
token: Optional[str] = None,
private_key: Optional[str] = None,
private_key_passphrase: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
) -> DeclarativeDataSource:
dictionary = self._get_snake_dict()
Expand All @@ -159,8 +156,6 @@ def to_api(
dictionary["private_key"] = private_key
if private_key_passphrase is not None:
dictionary["private_key_passphrase"] = private_key_passphrase
if client_id is not None:
dictionary["client_id"] = client_id
if client_secret is not None:
dictionary["client_secret"] = client_secret
return self.client_class().from_dict(dictionary)
Expand Down

0 comments on commit 291028f

Please sign in to comment.