Skip to content

Commit

Permalink
minor fix when loading from file
Browse files Browse the repository at this point in the history
  • Loading branch information
berislavlopac committed Mar 10, 2023
1 parent 6316e8c commit ff843af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyapi/server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def from_file(cls, path: Union[Path, str], *args, **kwargs) -> Application:
kwargs: Keyword arguments are passed on to the class constructor.
"""
path = Path(path)
return cls(get_spec_from_file(path), *args, spec_url=f"{path.as_uri()}/", **kwargs)
return cls(get_spec_from_file(path), *args, spec_url=path.as_uri(), **kwargs)


def _load_module(name: str) -> ModuleType:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "pyapi-server"
version = "0.3.1"
version = "0.3.2"
description = "Lightweight API framework using an OpenAPI spec for routing and validation."
readme = "README.md"
license = {text = "MIT"}
Expand Down
1 change: 1 addition & 0 deletions release-notes/0.3.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* minor fix with loding from file

0 comments on commit ff843af

Please sign in to comment.