OapiCodemode.SpecStore.Meta (oapi_codemode v0.5.0)

Copy Markdown View Source

What the registry needs to know about a spec at registration time, and nothing else: one read, then no spec bytes are held.

title and tags end up in tool descriptions, default_base_url is the fallback when an ApiConfig names no base URL, security_schemes and security are what the proxy selects a credential with, and index_bytes is the encoded size of the slim search index — measured at decompose time so the registry's cap is enforced against the bytes that will actually be spliced into the sandbox.

Summary

Functions

The document's default base URL: the first server it declares.

The %Meta{} a store should answer with for a freshly put document.

Types

t()

@type t() :: %OapiCodemode.SpecStore.Meta{
  default_base_url: String.t() | nil,
  index_bytes: non_neg_integer(),
  operation_count: non_neg_integer(),
  security: list() | nil,
  security_schemes: map(),
  tags: [String.t()],
  title: String.t() | nil
}

Functions

default_base_url(arg1)

@spec default_base_url([map()]) :: String.t() | nil

The document's default base URL: the first server it declares.

from_decomposed(decomposed)

@spec from_decomposed(OapiCodemode.Decomposed.t()) :: t()

The %Meta{} a store should answer with for a freshly put document.

Here so that "the default base URL is the first server the document declares" is written once, rather than once per store.