-
Notifications
You must be signed in to change notification settings - Fork 49
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 PhoenixSwagger #31
Conversation
Pull Request Test Coverage Report for Build 111
💛 - Coveralls |
@evansb I'm not sure how to test the swagger part since they are just "metadata" there. |
Create a test that simply use the function and does nothing, add a comment saying it's because swagger |
Done. Also a note to @sreycodes, defmacro swagger_path(action, [do: {:__block__, _, [first_expr | exprs]}]) do
fun_name = "swagger_path_#{action}" |> String.to_atom
body = Enum.reduce(exprs, first_expr, fn expr, acc ->
quote do unquote(acc) |> unquote(expr) end
end)
quote do
def unquote(fun_name)(route) do So basically the macro creates another function with the name |
07353b2
to
a1e341b
Compare
* Add PhoenixSwagger * Add example swagger path and definition * Add swagger tests
No description provided.