jkakar / aws-codegen

Code generator for AWS clients in Elixir.
Other
35 stars 0 forks source link

Fix URL parameters in generated API Gateway and IoT URLs #35

Closed rrpff closed 7 years ago

rrpff commented 7 years ago

This affects lib/aws/api_gateway.ex and lib/aws/iot.ex in generated Elixir code.

The encoded URL params were not being interpolated correctly because the camelcased name value was being used instead of the correctly snake cased location_name value.

After updating the aws-elixir source, there are many changes like this:

   def create_authorizer(client, rest_api_id, input, options \\ []) do
-    url = "/restapis/{restapi_id}/authorizers"
+    url = "/restapis/#{URI.encode(rest_api_id)}/authorizers"
     headers = []
     request(client, :post, url, headers, input, options, 201)
   end
jkakar commented 7 years ago

Thank you @zuren!