Skip to content

Commit d7eb348

Browse files
committed
fix URL type after starlette update
1 parent 41bb265 commit d7eb348

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tipg/factory.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def url_for(self, request: Request, name: str, **path_params: Any) -> str:
162162
if self.router_prefix:
163163
base_url += self.router_prefix.lstrip("/")
164164

165-
return url_path.make_absolute_url(base_url=base_url)
165+
return str(url_path.make_absolute_url(base_url=base_url))
166166

167167
def _create_html_response(
168168
self,
@@ -238,13 +238,13 @@ def landing(
238238
),
239239
model.Link(
240240
title="the API definition (JSON)",
241-
href=request.url_for("openapi"),
241+
href=str(request.url_for("openapi")),
242242
type=MediaType.openapi30_json,
243243
rel="service-desc",
244244
),
245245
model.Link(
246246
title="the API documentation",
247-
href=request.url_for("swagger_ui_html"),
247+
href=str(request.url_for("swagger_ui_html")),
248248
type=MediaType.html,
249249
rel="service-doc",
250250
),

0 commit comments

Comments
 (0)