Skip to content

Commit 4f12337

Browse files
authored
Merge pull request #87 from koxudaxi/fix_resolving_template_path
fix resolving template path
2 parents 534bce4 + f7999f5 commit 4f12337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastapi_code_generator/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def generate_code(
4747
results: Dict[Path, str] = {}
4848
code_formatter = CodeFormatter(PythonVersion.PY_38, Path().resolve())
4949
for target in template_dir.rglob("*"):
50-
relative_path = target.relative_to(template_dir.absolute())
50+
relative_path = target.relative_to(template_dir)
5151
result = environment.get_template(str(relative_path)).render(
5252
operations=parsed_object.operations,
5353
imports=parsed_object.imports,

0 commit comments

Comments
 (0)