Rolodex v0.2.0 Rolodex.Config

Configuration for Rolodex.

You can define this config in your config/<env>.exs files, keyed by :rolodex, and it will be passed into new/1 in Mix.Tasks.GenDocs.run/1.

Options

  • description (required) - Description for your documentation output
  • router (required) - Phoenix.Router module to inspect
  • title (required) - Title for your documentation output
  • version (required) - Your documentation's version
  • filter (default: :none) - TODO
  • locale (default: "en") - Locale key to use when processing descriptions
  • pipelines (default: %{}) - Map of pipeline configs. Used to set default parameter values for all routes in a pipeline. See Rolodex.PipelineConfig.
  • processor (default: Rolodex.Processors.Swagger) - Module implementing the Rolodex.Processor behaviour
  • writer (default: %{file_path: "", writer: Rolodex.Writers.FileWriter) - Destination for writing and a module implementing the Rolodex.Writer behaviour

Example

config :rolodex,

title: "MyApp",
description: "An example",
version: "1.0.0",
router: MyRouter,
processor: Rolodex.Processors.Swagger,
writer: %{
  file_path: "/",
  module: Rolodex.Writers.FileWriter
},
pipelines: %{
  api: %{
    headers: %{"X-Request-Id" => :uuid}
  }
}

Link to this section Summary

Link to this section Types

Link to this type

pipeline_configs()
pipeline_configs() :: %{optional(:atom) => Rolodex.PipelineConfig.t()}

Link to this type

t()
t() :: %Rolodex.Config{
  description: binary(),
  filter: keyword() | :none,
  locale: binary(),
  pipelines: pipeline_configs() | nil,
  processor: module(),
  router: module(),
  title: binary(),
  version: binary(),
  writer: map()
}

Link to this section Functions

Link to this function

new(kwl \\ [])
new(list()) :: Rolodex.Config.t()