Skip to content

Commit

Permalink
fix small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-rp committed May 6, 2024
1 parent d26d228 commit 0381285
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion openapi_python_client/parser/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ def data_json_path(self) -> str:
@property
def transformer(self) -> Optional[TransformerSetting]:
# meet a couple of conditions to be a transformer
print(self.parent.payload)
if not self.parent or not self.path_parameters or not self.parent.payload:
return None

Expand Down
2 changes: 1 addition & 1 deletion openapi_python_client/parser/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,4 @@ def get_path_parts(path: str) -> List[str]:
def is_var_part(part: str) -> bool:
"""check if a part is path var"""
part = part.strip()
return part[0] == "{" and part[-1] == "}"
return len(part) > 1 and part[0] == "{" and part[-1] == "}"

0 comments on commit 0381285

Please sign in to comment.