# `Lemma.OpenAPI`
[🔗](https://github.com/lemma/lemma/blob/main/lib/lemma/openapi.ex#L1)

OpenAPI and temporal API docs helpers (`lemma_openapi` crate). Separate from core [`Lemma`] runtime.

# `generate_openapi`

```elixir
@spec generate_openapi(
  Lemma.engine(),
  keyword()
) :: {:ok, map()} | {:error, term()}
```

Generates an OpenAPI 3.1 JSON document for the loaded specs (Lemma HTTP API shape).

Options: `:explanations` (boolean, default false), `:effective` (datetime string or nil for "now").

# `temporal_api_sources`

```elixir
@spec temporal_api_sources(Lemma.engine()) :: {:ok, [map()]} | {:error, term()}
```

Temporal version options for API docs (same boundaries as `lemma serve` / Scalar).

Returns a list of maps with string keys `"title"` and `"slug"`. Slug `"now"` means the
latest interface at request time; other slugs match `effective` strings for `generate_openapi/2`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
