Skip to content

Commit 143e3d2

Browse files
šŸ› Increase timeout when reading remove openapi document; add default name for urls ending with a forward slash.
1 parent 4bf7b40 commit 143e3d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ā€Žsrc/lapidary/render/load.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def is_url(self) -> bool:
6868
class HttpDocumentHandler(DocumentHandler[str]):
6969
def __init__(self, path: str) -> None:
7070
super().__init__(path)
71-
self._client = httpx.AsyncClient()
71+
self._client = httpx.AsyncClient(timeout=30.0)
7272
self._cache: str | None = None
7373

7474
async def load(self) -> str:
@@ -84,7 +84,7 @@ def _file_name(self) -> str:
8484

8585
parsed = urlparse(self._path)
8686
_, name = split(parsed.path)
87-
return name
87+
return name or 'openapi.yaml'
8888

8989
async def save_to(self, target: anyio.Path) -> str:
9090
text = await self.load()

0 commit comments

Comments
Ā (0)