WardrikRest.Operation (wardrik_rest v0.1.0-rc.1)

Copy Markdown

One operation of an API, which becomes one tool.

  • :name - unique within the API, as "properties_runReport".
  • :path - relative to the API's base URL, with {name} and {+name} templates.
  • :security - alternatives, each the schemes that apply together. [[]] needs none.
  • :encoding - how its body is sent: :json, or :form as application/x-www-form-urlencoded, nested as card[number]=4242.

Summary

Types

method()

@type method() :: :get | :post | :put | :patch | :delete

t()

@type t() :: %WardrikRest.Operation{
  description: String.t(),
  encoding: :json | :form,
  method: method(),
  name: String.t(),
  parameters: [WardrikRest.Parameter.t()],
  path: String.t(),
  security: [[String.t()]]
}