Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add identifier to reserved types and fix reserved_type references to use correct reference rather than ghost-type #115

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."], ""))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous code would've generated aws_quicksight_identifier() according to the example provided. This was an oversight and was missed here.

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
Loading