[Feature]: Check `RESTStream.url_base` for trailing slashes
Feature scope
Taps (catalog, state, stream maps, etc.)
Description
Trailing slashes in RESTStream.url_base (or leading slashes in RESTStream.path, which is an undocumented attribute) cause URLs to have a double slash //. This is handled by requests by stripping the path and redirecting to the base URL, which is not what developers want in most situations.
Other documentation changes that would be good to ship with this feature:
- Example
RESTStream.url_baseshould not have a trailing slash -
RESTStream.pathshould be documented in https://sdk.meltano.com/en/latest/classes/singer_sdk.RESTStream.html
Related:
- #883
@edgarrmondragon - I think the naive expectation we set was that they would be concatenated together and that the slash could exist on one but not both of url_base and path.
Is the proposal that we'd automatically strip a trailing slash on url_base or that we would fail tests with an error, or something else?
@aaronsteers
Is the proposal that we'd automatically strip a trailing slash on
url_baseor that we would fail tests with an error, or something else?
I prefer the first option. It would mean we also have to ensure there's a leading slash in .path. It's probably better to attempt conforming the URL and path under the hood, rather than failing.
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.
Still relevant
This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.