@@ -628,7 +628,7 @@ def _collect_handler_routes(resources: dict[str, Resource]) -> dict[str, list[tu
628628 for endpoint in resource .endpoints :
629629 if endpoint .response_handler :
630630 handler_routes .setdefault (endpoint .response_handler , []).append (
631- (endpoint .method , endpoint .path )
631+ (endpoint .method , "/v2" + endpoint .path )
632632 )
633633 return handler_routes
634634
@@ -643,7 +643,7 @@ def _collect_boolean_status_prefixes(resources: dict[str, Resource]) -> list[tup
643643 for resource in resources .values ():
644644 for endpoint in resource .endpoints :
645645 if endpoint .boolean_status :
646- prefix = endpoint .path .split ("{" )[0 ]
646+ prefix = ( "/v2" + endpoint .path ) .split ("{" )[0 ]
647647 result .append ((endpoint .method , prefix ))
648648 return result
649649
@@ -883,7 +883,7 @@ def generate_sync_method(endpoint: Endpoint, method_name: str) -> list[str]:
883883 lines .append (' """' )
884884
885885 # Build path with parameters (URL-encode each path arg)
886- path = endpoint .path
886+ path = "/v2" + endpoint .path
887887 for pp in path_params :
888888 path = path .replace (f"{{{ pp .name } }}" , f"{{quote(str({ pp .python_name } ), safe='')}}" )
889889
@@ -1163,7 +1163,7 @@ def generate_async_method(endpoint: Endpoint, method_name: str) -> list[str]:
11631163 lines .append (' """' )
11641164
11651165 # Build path with parameters (URL-encode each path arg)
1166- path = endpoint .path
1166+ path = "/v2" + endpoint .path
11671167 for pp in path_params :
11681168 path = path .replace (f"{{{ pp .name } }}" , f"{{quote(str({ pp .python_name } ), safe='')}}" )
11691169
0 commit comments