Skip to content

Commit

Permalink
fix(templates): Include empty schemas directory in REST tap cookiec…
Browse files Browse the repository at this point in the history
…utter (#2195)
  • Loading branch information
edgarrmondragon committed Jan 29, 2024
1 parent 6844477 commit c8e2461
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cookiecutter/tap-template/hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
for client_py in PACKAGE_PATH.rglob("*-client.py"):
client_py.unlink()

if "{{ cookiecutter.stream_type }}" != "REST":
shutil.rmtree(PACKAGE_PATH.joinpath("schemas"), ignore_errors=True)

if "{{ cookiecutter.auth_method }}" not in ("OAuth2", "JWT"):
PACKAGE_PATH.joinpath("auth.py").unlink()

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""JSON schema files for the REST API."""

0 comments on commit c8e2461

Please sign in to comment.