Skip to content

fix: BuildPath drops string placeholder values, sending requests to the wrong URL - #7

Open
childish-sambino wants to merge 1 commit into
Files-com:masterfrom
childish-sambino:fix/build-path-string-values
Open

fix: BuildPath drops string placeholder values, sending requests to the wrong URL#7
childish-sambino wants to merge 1 commit into
Files-com:masterfrom
childish-sambino:fix/build-path-string-values

Conversation

@childish-sambino

Copy link
Copy Markdown

BuildPath only recognized map[string]interface{}, so the map[string]string that file.Get passes failed the type assertion and the {path} placeholder was silently replaced with an empty string. Every file.Get(path) requested GET /files/ (the root) regardless of the argument.

The value-conversion switch also only assigned string values for the literal path placeholder, so any other string-valued placeholder was blanked. chat_session.Find(ChatSessionFindParams{Id: "abc123"}) sends GET /chat_sessions/ instead of /chat_sessions/abc123.

Added BuildPath tests for both; they fail without the fix.

🤖 Generated by Quad tha God

@childish-sambino
childish-sambino marked this pull request as ready for review July 7, 2026 22:25
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.

1 participant