We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f41e8b4 commit 95ceb92Copy full SHA for 95ceb92
openapi_python_client/__init__.py
@@ -126,7 +126,7 @@ def _run_post_hooks(self) -> None:
126
self._run_command(command)
127
128
def _run_command(self, cmd: str) -> None:
129
- cmd_name = cmd.split(" ")[0]
+ cmd_name = cmd.split(" ", maxsplit=1)[0]
130
command_exists = shutil.which(cmd_name)
131
if not command_exists:
132
self.errors.append(
openapi_python_client/parser/properties/schemas.py
@@ -50,7 +50,7 @@ def get_reference_simple_name(ref_path: str) -> str:
50
"""
51
Takes a path like `/components/schemas/NameOfThing` and returns a string like `NameOfThing`.
52
53
- return ref_path.split("/")[-1]
+ return ref_path.rsplit("/", maxsplit=1)[-1]
54
55
56
@define
0 commit comments