Tama.Dex.Operation (tama_dex v0.1.0)

Copy Markdown View Source

One normalized operation of a Tama.Dex.Document.

  • scopes: a caller needs every one of them to run the operation.
  • confirmation: %{field: name, description: text} or nil.
  • bounds: the informational x-tama-bounds map, or %{}.
  • identity: the x-tama-identity names, or [].
  • extensions: the operation's other x- extensions, kept as opaque metadata. They are never used for search ranking or authorization.
  • fields: the input schema's top-level properties, as %{name: name, description: text | nil} ordered by name.
  • input_schema, success_schema and error_schema: the request, 200 and default schemas, each bundled to stand alone. Any components a schema references are carried under its $defs. error_schema is nil when the operation declares no default response.

Summary

Types

confirmation()

@type confirmation() :: %{field: String.t(), description: String.t()}

field()

@type field() :: %{name: String.t(), description: String.t() | nil}

t()

@type t() :: %Tama.Dex.Operation{
  bounds: %{optional(String.t()) => non_neg_integer()},
  confirmation: confirmation() | nil,
  deprecated: boolean(),
  description: String.t(),
  destructive: boolean(),
  error_schema: map() | nil,
  extensions: %{optional(String.t()) => term()},
  fields: [field()],
  identity: [String.t()],
  input_schema: map(),
  operation_id: String.t(),
  scopes: [String.t()],
  source: String.t(),
  success_schema: map(),
  summary: String.t(),
  tags: [String.t()]
}