Skip to content
This repository was archived by the owner on Nov 19, 2023. It is now read-only.

Commit c3a48c9

Browse files
committed
Fix url parse at nested routers
1 parent a359549 commit c3a48c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi_tester/loaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def resolve_path(self, endpoint_path: str, method: str) -> Tuple[str, ResolverMa
132132
except Resolver404:
133133
continue
134134
else:
135-
for key, value in resolved_route.kwargs.items():
135+
for key, value in reversed(list(resolved_route.kwargs.items())):
136136
index = path.rfind(str(value))
137137
path = f"{path[:index]}{{{key}}}{path[index + len(str(value)):]}"
138138
if "{pk}" in path and api_settings.SCHEMA_COERCE_PATH_PK:

0 commit comments

Comments
 (0)