Skip to content
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

refactor(templates): Moved class-level attributes to the top in REST tap template #2528

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 @@ -55,17 +55,18 @@
class {{ cookiecutter.source_name }}Stream({{ cookiecutter.stream_type }}Stream):
"""{{ cookiecutter.source_name }} stream class."""

# Update this value if necessary or override `parse_response`.
records_jsonpath = "$[*]"

# Update this value if necessary or override `get_new_paginator`.
next_page_token_jsonpath = "$.next_page" # noqa: S105

@property
def url_base(self) -> str:
"""Return the API URL root, configurable via tap settings."""
# TODO: hardcode a value here, or retrieve it from self.config
return "https://api.mysample.com"

records_jsonpath = "$[*]" # Or override `parse_response`.

# Set this value or override `get_new_paginator`.
next_page_token_jsonpath = "$.next_page" # noqa: S105

{%- if cookiecutter.auth_method in ("OAuth2", "JWT") %}

@cached_property
Expand Down
Loading