We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In dsl.ex, if you have :format as attribute
def default_attributes(serializer, struct, conn) do serializer.__attributes |> Enum.map(&({&1, apply(serializer, &1, [struct, conn])}))
you get
warning: Elixir.MyApp.V1.PhotoView.format/3 is deprecated. Please use JaSerializer.format/4 instead, eg: JaSerializer.format(Elixir.MyApp.V1.PhotoView, data, conn, opts)
and it seems to infinitely loop
The text was updated successfully, but these errors were encountered:
This will be fixed with 1.0.0 when we remove the deprecated function.
Sorry, something went wrong.
In the meantime, how can you workaround it to use format as an attribute name?
format
@coneybeare you can use the attributes/2 callback to serialize any conflicting keywords like format:
attributes/2
defmodule MySerializer do def attributes(record, _conn) do Map.take(record, [:format]) end end
No branches or pull requests
In dsl.ex, if you have :format as attribute
def default_attributes(serializer, struct, conn) do
serializer.__attributes
|> Enum.map(&({&1, apply(serializer, &1, [struct, conn])}))
you get
warning: Elixir.MyApp.V1.PhotoView.format/3 is deprecated.
Please use JaSerializer.format/4 instead, eg:
JaSerializer.format(Elixir.MyApp.V1.PhotoView, data, conn, opts)
and it seems to infinitely loop
The text was updated successfully, but these errors were encountered: