Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove trailing slash from API base URL #464

Merged
merged 1 commit into from
Aug 26, 2024
Merged

chore: remove trailing slash from API base URL #464

merged 1 commit into from
Aug 26, 2024

Conversation

ctreatma
Copy link
Contributor

The packngo SDK assumed that the base API URL did not end with a slash, but equinix-sdk-go assumes that it does (since it's generated from an OpenAPI spec, all API paths in equinix-sdk-go start with a slash). A trailing slash on the base API URL doesn't cause problems for equinix-sdk-go, but it can cause confusion when triaging issues.

This removes the trailing slash from the 2 places where we are configuring the base API URL. We can do this safely now because we no longer use packngo. Alternatively, we could make the base API URL configuration optional; the API URL configured here is identical to the default used by the metalv1 package in equinix-sdk-go, so we only really need to change the API URL for tests that use a mock API. That change would be more extensive so I opted for the smallest change instead.

@displague displague merged commit 81ea957 into main Aug 26, 2024
8 checks passed
@displague displague deleted the api_url branch August 26, 2024 21:50
Copy link

This issue has been resolved in version 0.25.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants