Skip to content

chore: Fix relative path to spec (in this release, regression from #515) #517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi_python_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ def _get_document(*, url: Optional[str], path: Optional[Path]) -> Union[Dict[str
return GeneratorError(header="Could not get OpenAPI document from provided URL")
elif path is not None:
yaml_bytes = path.read_bytes()
content_type = mimetypes.guess_type(path.as_uri(), strict=True)[0]
content_type = mimetypes.guess_type(path.absolute().as_uri(), strict=True)[0]

else:
return GeneratorError(header="No URL or Path provided")
Expand Down