Skip to content

Commit 5a846b2

Browse files
committed
Merge pull request #22 from jkakar/fix-rest-json-trailing-slash
Strip trailing slashes in generated URLs for REST-JSON services.
2 parents ad9d5b9 + acff3f2 commit 5a846b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/aws_codegen/rest_json_service.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ defmodule AWS.CodeGen.RestJSONService do
3333
fn(parameter, acc) ->
3434
name = Enum.join([~S(#{), "URI.encode(", parameter.code_name, ")", ~S(})])
3535
String.replace(acc, "{#{parameter.name}}", "#{name}")
36-
end)
36+
end) |>
37+
# FIXME(jkakar) This is only here because the invoke-async method
38+
# defined for the Lambda API has an apparentyl spurious trailing slash
39+
# in the JSON spec.
40+
String.rstrip(?/)
3741
end
3842
end
3943

0 commit comments

Comments
 (0)