ExFattureincloud.Operations (ExFattureincloud v0.1.0)

Copy Markdown View Source

Operation metadata from the pinned OpenAPI specification and documented extensions.

Summary

Types

HTTP method, path template, parameters and accepted media type for an operation.

A snake_case atom or string, or an official OpenAPI operation ID.

Validation rules for one query parameter.

Functions

All supported operation descriptors.

Finds an operation by name or returns nil when no operation matches.

Types

descriptor()

@type descriptor() :: %{
  id: atom(),
  operation_id: String.t(),
  path: String.t(),
  path_params: [String.t()],
  query: [query_parameter()],
  paginated: boolean(),
  module: String.t(),
  accept: String.t(),
  body_required: boolean(),
  method: :get | :post | :put | :patch | :delete,
  body: :none | :json | :multipart
}

HTTP method, path template, parameters and accepted media type for an operation.

id()

@type id() :: atom() | String.t()

A snake_case atom or string, or an official OpenAPI operation ID.

query_parameter()

@type query_parameter() :: %{
  name: String.t(),
  required: boolean(),
  type: String.t() | nil,
  enum: [term()],
  minimum: number() | nil,
  maximum: number() | nil
}

Validation rules for one query parameter.

Functions

all()

@spec all() :: [descriptor()]

All supported operation descriptors.

get(id)

@spec get(term()) :: descriptor() | nil

Finds an operation by name or returns nil when no operation matches.