OpenPayments.Specification (open_payments_elixir v1.0.0)

Copy Markdown View Source

The bundled Open Payments specification and operation inventory.

Documents are loaded at compilation, so using the SDK does not fetch schemas from a server or depend on a Git submodule. revision/0 identifies the exact upstream commit from which the documents were copied.

Summary

Functions

Returns the bundled OpenAPI document for a server.

Fetches a named component schema, or returns :error if it is unknown.

Lists supported protocol operations in stable order by operation ID.

The full upstream specification commit SHA.

The bundled specification's semantic version.

Types

operation()

@type operation() :: %{
  server: server(),
  method: :get | :post | :delete,
  path: String.t(),
  id: String.t(),
  success_statuses: [pos_integer()]
}

server()

@type server() :: :auth | :resource | :wallet_address

Functions

document(server)

@spec document(server()) :: map()

Returns the bundled OpenAPI document for a server.

fetch_schema(server, name)

@spec fetch_schema(server(), String.t()) :: {:ok, map()} | :error

Fetches a named component schema, or returns :error if it is unknown.

operations()

@spec operations() :: [operation()]

Lists supported protocol operations in stable order by operation ID.

revision()

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

The full upstream specification commit SHA.

version()

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

The bundled specification's semantic version.