PraugaFlexDoc.Config (prauga_flexdoc v0.4.5)

Copy Markdown View Source

FlexDoc renderer configuration.

Build with new/1. All options are keyword arguments with sensible defaults.

Options

  • :path - docs mount path (default "/docs")
  • :spec_url - OpenAPI document URL (default "/openapi.json")
  • :title - page and renderer title (default "API Reference")
  • :theme - renderer theme preset: "system", "light", or "dark"
  • :try_it_enabled - whether the Try It client is enabled (default true)
  • :expand - optional expansion preset or section list
  • :try_it_default_server - optional default server URL for Try It requests
  • :try_it_credentials - optional fetch credentials mode: "omit", "same-origin", or "include"
  • :try_it_api_client_persistence_key - optional persistence key, or false to disable
  • :try_it_host_execution - exposes host execution when a real native executor is configured
  • :host_execution_protected - explicit acknowledgement that application auth/middleware protects the docs/execute surface
  • :host_execution - optional PraugaFlexDoc.HostExecution instance

Summary

Types

t()

Validated FlexDoc configuration.

Functions

Creates a validated configuration from keyword options.

Types

t()

@type t() :: %PraugaFlexDoc.Config{
  expand: term(),
  host_execution: PraugaFlexDoc.HostExecution.t() | nil,
  host_execution_protected: boolean(),
  path: String.t(),
  spec_url: String.t(),
  theme: String.t(),
  title: String.t(),
  try_it_api_client_persistence_key: String.t() | false | nil,
  try_it_credentials: String.t() | nil,
  try_it_default_server: String.t() | nil,
  try_it_enabled: boolean(),
  try_it_host_execution: boolean()
}

Validated FlexDoc configuration.

Functions

new(opts \\ [])

@spec new(keyword()) :: t()

Creates a validated configuration from keyword options.

See the module documentation for supported options.