Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def _collect_handler_routes(resources: dict[str, Resource]) -> dict[str, list[tu
for endpoint in resource.endpoints:
if endpoint.response_handler:
handler_routes.setdefault(endpoint.response_handler, []).append(
(endpoint.method, endpoint.path)
(endpoint.method, "/v2" + endpoint.path)
)
return handler_routes

Expand All @@ -643,7 +643,7 @@ def _collect_boolean_status_prefixes(resources: dict[str, Resource]) -> list[tup
for resource in resources.values():
for endpoint in resource.endpoints:
if endpoint.boolean_status:
prefix = endpoint.path.split("{")[0]
prefix = ("/v2" + endpoint.path).split("{")[0]
result.append((endpoint.method, prefix))
return result

Expand Down Expand Up @@ -883,7 +883,7 @@ def generate_sync_method(endpoint: Endpoint, method_name: str) -> list[str]:
lines.append(' """')

# Build path with parameters (URL-encode each path arg)
path = endpoint.path
path = "/v2" + endpoint.path
for pp in path_params:
path = path.replace(f"{{{pp.name}}}", f"{{quote(str({pp.python_name}), safe='')}}")

Expand Down Expand Up @@ -1163,7 +1163,7 @@ def generate_async_method(endpoint: Endpoint, method_name: str) -> list[str]:
lines.append(' """')

# Build path with parameters (URL-encode each path arg)
path = endpoint.path
path = "/v2" + endpoint.path
for pp in path_params:
path = path.replace(f"{{{pp.name}}}", f"{{quote(str({pp.python_name}), safe='')}}")

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "vantage-python"
version = "0.3.3"
version = "0.4.0"
description = "Python SDK for the Vantage API"
readme = "README.md"
license = "MIT"
Expand Down
Loading