papyrus icon indicating copy to clipboard operation
papyrus copied to clipboard

Path parameter in filename not working

Open aleksrutins opened this issue 1 year ago • 1 comments

Calling

@GET("/cask/:name.json")
func cask(name: String) async throws -> Cask

with name: "iterm2" tries to request /cask/:name.json?name=iterm2 instead of /cask/iterm2.json, as expected.

Am I misunderstanding the parameter syntax?

aleksrutins avatar Jul 18 '24 20:07 aleksrutins

Thanks for the report @aleksrutins - this is because it's literally looking for a parameter named name.json to replace - but that obviously doesn't make sense!

Working on a fix.

joshuawright11 avatar Jul 19 '24 13:07 joshuawright11