Skip to content

Commit a55ac0f

Browse files
authored
chore: Fix relative path to spec (in this release, regression from #515) (#517)
1 parent 6e9d81f commit a55ac0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: openapi_python_client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def _get_document(*, url: Optional[str], path: Optional[Path]) -> Union[Dict[str
394394
return GeneratorError(header="Could not get OpenAPI document from provided URL")
395395
elif path is not None:
396396
yaml_bytes = path.read_bytes()
397-
content_type = mimetypes.guess_type(path.as_uri(), strict=True)[0]
397+
content_type = mimetypes.guess_type(path.absolute().as_uri(), strict=True)[0]
398398

399399
else:
400400
return GeneratorError(header="No URL or Path provided")

0 commit comments

Comments
 (0)