I am new to Elixir/Phoenix. Is there a way to add Swagger documentation to the Phoenix api project?
I looked at https://github.com/xerions/phoenix_swagger but that was updated several months ago and has unresolved old open issues.
This is another one https://github.com/OpenAperture/swaggerdoc with similar issues.
Or should I be using Maru for api projects?
Both projects get updates. SwaggerDoc offers Ecto support, but the Build status has been failing for two months.
PhoenixSwagger doesn't, but depends on extending the controller (which you can use to implement Ecto support yourself). Also it appears to be actively maintained at the moment.
We are actively maintaining https://github.com/everydayhero/phoenix_swagger with additional features
defmodule MyApp.UserController do
use MyApp.Web, :controller
import PhoenixSwagger
swagger_path :index do
get "/users"
summary "Get users"
description "Get all users"
response 200, "Success", :Users
tag "users"
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With