# `FeaturevisorSchemas.OptionSource`
[🔗](https://github.com/featurevisor/featurevisor-elixir/blob/v2.1.0/lib/featurevisor_schemas/structs.ex#L169)

Choices for a field that come from the application, such as cities from a
service. `search` gets a query and returns `{:ok, choices}`, each a value or
a map with a `"value"`. `lookup` gets a value and returns `{:ok, fields}` for
the choice it finds, `:error` for none, which reports `enum`, or
`{:error, reason}` when it cannot tell, which reports `refineError`.

# `t`

```elixir
@type t() :: %FeaturevisorSchemas.OptionSource{
  key: String.t(),
  lookup:
    (term(), FeaturevisorSchemas.CheckInfo.t() -&gt;
       {:ok, map()} | :error | {:error, term()})
    | nil,
  message: String.t() | nil,
  path: String.t(),
  reads: [String.t()],
  search:
    (String.t(), FeaturevisorSchemas.CheckInfo.t() -&gt;
       {:ok, list()} | {:error, term()})
    | nil
}
```

---

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