Skip to content

Commit

Permalink
default :t type_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Visciano committed Sep 5, 2021
1 parent aba0eba commit bae7bec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dataspecs/plug/loader.ex
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ if Code.ensure_loaded?(Plug) do
Declare the type the body of a route should conform
For example:
post "/foo", typeref(Model.Foo, :t) do
post "/foo", typeref(Model.Foo) do
...
end
"""
def typeref(module, type), do: [assigns: %{dataspec: %{type: {module, type}, value: nil}}]
def typeref(module, type \\ :t), do: [assigns: %{dataspec: %{type: {module, type}, value: nil}}]

@spec value(Plug.Conn.t()) :: term()

Expand Down

0 comments on commit bae7bec

Please sign in to comment.