Skip to content

Commit

Permalink
Update lib/aws_codegen/rest_service.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Milde <[email protected]>
  • Loading branch information
onno-vos-dev and LostKobrakai committed Mar 14, 2024
1 parent 44a1cc4 commit 65210de
Showing 1 changed file with 23 additions and 24 deletions.
47 changes: 23 additions & 24 deletions lib/aws_codegen/rest_service.ex
Original file line number Diff line number Diff line change
Expand Up @@ -169,31 +169,30 @@ defmodule AWS.CodeGen.RestService do
function_parameter_types(action, true)
end

def function_parameter_types(action, required_only \\ false) do
def function_parameter_types(action, required_only \\ false)

def function_parameter_types("GET", required_only) do
language = action.language

Check warning on line 175 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 175 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

** (CompileError) lib/aws_codegen/rest_service.ex:175: undefined function action/0 (expected AWS.CodeGen.RestService to define such a function or for it to be imported, but none are available)

Check warning on line 175 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 175 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

** (CompileError) lib/aws_codegen/rest_service.ex:175: undefined function action/0 (expected AWS.CodeGen.RestService to define such a function or for it to be imported, but none are available)

Check warning on line 175 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check failure on line 175 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

** (CompileError) lib/aws_codegen/rest_service.ex:175: undefined function action/0 (expected AWS.CodeGen.RestService to define such a function or for it to be imported, but none are available)
Enum.join([
join_parameter_types(action.url_parameters, language)
| case action.method do
"GET" ->
case required_only do
false ->
[
join_parameter_types(action.query_parameters, language),
join_parameter_types(action.request_header_parameters, language),
join_parameter_types(action.request_headers_parameters, language)
]

true ->
[
join_parameter_types(action.required_query_parameters, language),
join_parameter_types(action.required_request_header_parameters, language)
]
end

_ ->
[]
end
])

get_parameter_types =
if required_only do
[
join_parameter_types(action.required_query_parameters, language),

Check warning on line 180 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 180 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 180 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name
join_parameter_types(action.required_request_header_parameters, language)

Check warning on line 181 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 181 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 181 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name
]
else
[
join_parameter_types(action.query_parameters, language),

Check warning on line 185 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 185 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 185 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name
join_parameter_types(action.request_header_parameters, language),

Check warning on line 186 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 186 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 186 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name
join_parameter_types(action.request_headers_parameters, language)

Check warning on line 187 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 187 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 187 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name
]
end

Enum.join([join_parameter_types(action.url_parameters, language) | get_parameter_types])

Check warning on line 191 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 191 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / Elixir 1.13.4 / OTP 25.0.4

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name

Check warning on line 191 in lib/aws_codegen/rest_service.ex

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.13.4, 25.0.4, 3.20.0)

variable "action" does not exist and is being expanded to "action()", please use parentheses to remove the ambiguity or change the variable name
end

def function_parameter_types(action, _required_only) do
join_parameter_types(action.url_parameters, action.language)
end

defp join_parameter_types(parameters, language) do
Expand Down

0 comments on commit 65210de

Please sign in to comment.