I’m getting a swagger error which looks something like this
Generated wizex app
** (UndefinedFunctionError) function Poison.encode!/2 is undefined (module Poison is not available)
Poison.encode!(%{definitions: %{}, host: "localhost:4000", info: %{title: "wizex", version: "1.0"}, paths: %{}, swagger: "2.0"}, [pretty: true])
lib/mix/tasks/swagger.generate.ex:55: anonymous fn/1 in Mix.Tasks.Phx.Swagger.Generate.run/1
(elixir 1.10.2) lib/enum.ex:789: anonymous fn/3 in Enum.each/2
(stdlib 3.12) maps.erl:232: :maps.fold_1/3
(elixir 1.10.2) lib/enum.ex:2127: Enum.each/2
(mix 1.10.2) lib/mix/task.ex:330: Mix.Task.run_task/3
(mix 1.10.2) lib/mix/cli.ex:82: Mix.CLI.run_task/2
(elixir 1.10.2) lib/code.ex:917: Code.require_file/2
I have looked into issues created by other developers. That suggest we should do this
- add
{:jason, "~> 1.0"},
to yourmix.exs
deps - add
config :phoenix, :json_library, Jason
to yourconfig/config.exs
But I have done that but still getting the error
Can anyone suggest?