Skip to content

Commit

Permalink
Merge pull request #115 from aws-beam/fix-types-and-references-when-r…
Browse files Browse the repository at this point in the history
…eserved-type

Add identifier to reserved types and fix reserved_type references to use correct reference rather than ghost-type
  • Loading branch information
onno-vos-dev authored Aug 27, 2024
2 parents 22a7403 + 4260a36 commit 9c2005f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/aws_codegen/types.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ defmodule AWS.CodeGen.Types do

defp update_acc_with_types(acc, type, types, context) do
if reserved_type(type) do
module_name = String.downcase(String.replace(context.module_name, "AWS.", ""))
module_name = String.downcase(String.replace(context.module_name, ["aws_", "AWS."], ""))
Map.put(acc, "#{module_name}_#{type}", types)
else
Map.put(acc, type, types)
Expand Down Expand Up @@ -194,7 +194,7 @@ defmodule AWS.CodeGen.Types do
end

defp reserved_type(type) do
type == "node" || type == "term" || type == "function" || type == "reference"
type == "node" || type == "term" || type == "function" || type == "reference" || type == "identifier"
end

def function_argument_type(:elixir, action) do
Expand Down

0 comments on commit 9c2005f

Please sign in to comment.