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

New spec is specific to keys in requests being strings #198

Open
grant-zukowski-xumo opened this issue Jun 21, 2024 · 1 comment
Open

New spec is specific to keys in requests being strings #198

grant-zukowski-xumo opened this issue Jun 21, 2024 · 1 comment

Comments

@grant-zukowski-xumo
Copy link

For example:

https://github.com/aws-beam/aws-elixir/blob/master/lib/aws/generated/media_package_v2.ex#L592

When building request input within Elixir, most of our codebase does it using atoms as strings:

input = %{Foo: bar}

The new spec demands that

@type create_channel_request() :: %{String.t() => any()}

@TypeDoc """

Example:

  filter_configuration() :: %{
    "End" => [non_neg_integer()],
    "ManifestFilter" => [String.t()],
    "Start" => [non_neg_integer()],
    "TimeDelaySeconds" => [integer()]
  }

"""

Is it possible to have the generator accept atoms as keys as well?

@onno-vos-dev
Copy link
Member

@grant-zukowski-xumo Sorry to ignore this issue for so long 😢 I'll have a look at the codegen this weekend and see what can be done 👍 I guess this works with atoms due to to_string/1 usage in xml.ex and util.ex in which case it very much makes sense to align the spec with it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants