View Source OpenApiSpex.Paths (open_api_spex v3.16.0)

Defines the OpenApiSpex.Paths.t type.

Link to this section Summary

Functions

Create a Paths map from the routes in the given router module.

Create a Paths map from a list of routes.

Link to this section Types

@type path() :: String.t()

Paths Object

Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

@type t() :: %{required(path()) => OpenApiSpex.PathItem.t()}

Link to this section Functions

@spec from_router(module()) :: t()

Create a Paths map from the routes in the given router module.

@spec from_routes([%{path: String.t(), verb: atom()}]) :: t()

Create a Paths map from a list of routes.