open_api_spex v3.2.0 OpenApiSpex.PathItem View Source

Defines the OpenApiSpex.PathItem.t type.

Link to this section Summary

Types

Represents a route from in a Plug/Phoenix application. Eg from the generated __routes__ function in a Phoenix.Router module

Functions

Builds a PathItem struct from a list of routes that share a path

Link to this section Types

Link to this type

route() View Source
route() :: %{verb: atom(), plug: atom(), opts: any()}

Represents a route from in a Plug/Phoenix application. Eg from the generated __routes__ function in a Phoenix.Router module.

Link to this type

t() View Source
t() :: %OpenApiSpex.PathItem{
  "$ref": String.t() | nil,
  delete: OpenApiSpex.Operation.t() | nil,
  description: String.t() | nil,
  get: OpenApiSpex.Operation.t() | nil,
  head: OpenApiSpex.Operation.t() | nil,
  options: OpenApiSpex.Operation.t() | nil,
  parameters: [OpenApiSpex.Parameter.t() | OpenApiSpex.Reference.t()] | nil,
  patch: OpenApiSpex.Operation.t() | nil,
  post: OpenApiSpex.Operation.t() | nil,
  put: OpenApiSpex.Operation.t() | nil,
  servers: [OpenApiSpex.Server.t()] | nil,
  summary: String.t() | nil,
  trace: OpenApiSpex.Operation.t() | nil
}

Path Item Object

Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

Link to this section Functions

Link to this function

from_routes(routes) View Source
from_routes([route()]) :: nil | t()

Builds a PathItem struct from a list of routes that share a path.