Skip to content

Commit

Permalink
Use new Singer SDK JSON schema features (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Oct 12, 2024
1 parent fc011f3 commit 0fdbe0f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/[[ tap_package_import_name ]]/tap.py.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,49 @@ class Tap[[ tap_source_id ]](Tap):
"client_id",
th.StringType,
required=True,
secret=True,
title="Client ID",
description="Client ID to authenticate in [[ tap_source_name ]]",
),
[%- elif tap_auth_method == "API Key" %]
th.Property(
"api_key",
th.StringType,
required=True,
secret=True,
title="API Key",
description="API Key for [[ tap_source_name ]]",
),
[%- elif tap_auth_method == "Bearer Token" %]
th.Property(
"token",
th.StringType,
required=True,
secret=True,
title="API Token",
description="API Token for [[ tap_source_name ]]",
),
[%- elif tap_auth_method in ("OAuth2", "JWT", "Basic Auth") %]
th.Property(
"username",
th.StringType,
required=True,
title="Username",
description="Username in [[ tap_source_name ]]",
),
th.Property(
"password",
th.StringType,
required=True,
secret=True,
title="Password",
description="Password in [[ tap_source_name ]]",
),
[%- endif %]
th.Property(
"start_date",
th.DateTimeType,
title="Start Date",
description="Earliest datetime to get data from",
),
).to_dict()
Expand Down
4 changes: 2 additions & 2 deletions src/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ dependencies = [
"requests<3,>=2",
[%- endif %]
[%- if tap_auth_method == 'JWT' %]
"singer-sdk[jwt]~=0.41.0",
"singer-sdk[jwt]~=0.42.0a1",
[%- else %]
"singer-sdk~=0.41.0",
"singer-sdk~=0.42.0a1",
[%- endif %]
]
optional-dependencies.dev = [
Expand Down

0 comments on commit 0fdbe0f

Please sign in to comment.