You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling with /foo, string is set to /foo instead of foo. IMO, it should just be foo since the single / is part of the URI itself (the delimiter) and, if leading slash was desired, the endpoint should be called with //foo.
My use case is relative paths and path-like parameters - for example, GitHub branch protection rules which can be path-like patterns (e.g., feature/*). Easy workaround for my use case is just to string.lstrip('/'), but if I was handling a mix of absolute and relative paths with the same endpoint and no other parameters to indicate abs vs rel this could be problematic.
Needs Response ⚠️This issue needs a response from a memberStarliteThis issue was created in the Starlite era. It may not be up to date.
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Path parameters of type "path" are assigned with a leading slash:
Calling with
/foo
,string
is set to/foo
instead offoo
. IMO, it should just befoo
since the single/
is part of the URI itself (the delimiter) and, if leading slash was desired, the endpoint should be called with//foo
.My use case is relative paths and path-like parameters - for example, GitHub branch protection rules which can be path-like patterns (e.g.,
feature/*
). Easy workaround for my use case is just tostring.lstrip('/')
, but if I was handling a mix of absolute and relative paths with the same endpoint and no other parameters to indicate abs vs rel this could be problematic.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions