Current section

Files

Jump to
open_api_spex lib open_api_spex response.ex
Raw

lib/open_api_spex/response.ex

defmodule OpenApiSpex.Response do
@moduledoc """
Defines the `OpenApiSpex.Response.t` type.
"""
alias OpenApiSpex.{Header, Reference, MediaType, Link}
defstruct [
:description,
:headers,
:content,
:links
]
@typedoc """
[Response Object](https://swagger.io/specification/#responseObject)
Describes a single response from an API Operation, including design-time, static links to operations based on the response.
"""
@type t :: %__MODULE__{
description: String.t,
headers: %{String.t => Header.t | Reference.t} | nil,
content: %{String.t => MediaType.t},
links: %{String.t => Link.t | Reference.t} | nil
}
end