Skip to content

Commit

Permalink
fix: ensure generated code matches expected output
Browse files Browse the repository at this point in the history
This removes a newline from the generated code, so that it matches the
expected output.
  • Loading branch information
jhosteny committed Nov 20, 2024
1 parent 871d01b commit ed04a82
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions priv/rest.ex.eex
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,11 @@ defmodule <%= context.module_name %> do
)
<% end %>

meta =
<%= if action.host_prefix do %>
metadata() |> Map.put_new(:host_prefix, <%= inspect(action.host_prefix) %>)
<% else %>
metadata()
<% end %>
<%= if action.host_prefix do %>
meta = metadata() |> Map.put_new(:host_prefix, <%= inspect(action.host_prefix) %>)
<% else %>
meta = metadata()
<% end %>

Request.request_rest(client, meta, :get, url_path, query_params, headers, nil, options, <%= inspect(action.success_status_code) %>)<% else %>
@spec <%= action.function_name %>(map()<%= AWS.CodeGen.Types.function_parameter_types(action.method, action, false)%>, <%= if context.module_name == "AWS.ApiGatewayManagementApi" do %> String.t(), <% end %><%= AWS.CodeGen.Types.function_argument_type(context.language, action)%>, list()) :: <%= AWS.CodeGen.Types.return_type(context.language, action)%>
Expand Down Expand Up @@ -161,12 +160,11 @@ def <%= action.function_name %>(%Client{} = client<%= AWS.CodeGen.RestService.fu
)
<% end %>

meta =
<%= if action.host_prefix do %>
metadata() |> Map.put_new(:host_prefix, <%= inspect(action.host_prefix) %>)
<% else %>
metadata()
<% end %>
<%= if action.host_prefix do %>
meta = metadata() |> Map.put_new(:host_prefix, <%= inspect(action.host_prefix) %>)
<% else %>
meta = metadata()
<% end %>

Request.request_rest(client, meta, <%= AWS.CodeGen.RestService.Action.method(action) %>, url_path, query_params, headers, input, options, <%= inspect(action.success_status_code) %>)<% end %>
end<% end %>
Expand Down

0 comments on commit ed04a82

Please sign in to comment.