From 4260a36a87f972f37c8704ecaa991ce71b7695df Mon Sep 17 00:00:00 2001 From: Onno Vos Date: Tue, 27 Aug 2024 11:02:30 +0200 Subject: [PATCH] Add identifier to reserved types and fix reserved_type references to use correct reference rather than ghost-type --- lib/aws_codegen/types.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/aws_codegen/types.ex b/lib/aws_codegen/types.ex index dba1bb9..9fbe14c 100644 --- a/lib/aws_codegen/types.ex +++ b/lib/aws_codegen/types.ex @@ -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) @@ -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