View Source Swagdox.Path (swagdox v0.1.0)

Represents a path in the Open API specification.

Summary

Types

@type route() :: %{path: String.t(), plug: module(), plug_opts: atom(), verb: atom()}
@type t() :: %Swagdox.Path{
  controller: term(),
  description: term(),
  function: term(),
  parameters: term(),
  path: term(),
  responses: term(),
  security: term(),
  verb: term()
}

Functions

@spec build(Swagdox.Endpoint.t(), route()) :: %Swagdox.Path{
  controller: term(),
  description: term(),
  function: term(),
  parameters: term(),
  path: term(),
  responses: term(),
  security: term(),
  verb: term()
}

Builds a new Path.

Examples:

iex> Swagdox.Path.build(endpoint, route) %Swagdox.Path{

description: "Creates a User.",
path: "/users",
verb: :post

}

@spec operation_id(t()) :: String.t()