View Source Swagdox.Response (swagdox v0.1.1)
Describes a response in an OpenAPI specification.
Summary
Functions
Renders a response to a map.
Types
Functions
Renders a response to a map.
Examples
iex> response = Response.build(200, "User", "OK")
iex> Response.render(response)
%{
"200" => %{
"description" => "OK",
"content" => %{
"application/json" => %{
"schema" => %{
"$ref" => "#/components/schemas/User"
}
}
}
}
}
iex> response = Response.build(200, "OK")
iex> Response.render(response)
%{
"200" => %{
"description" => "OK"
}
}