# `WardrikRest.Spec`

What a `WardrikRest.Reader` reads from an API's description: its operations and the ways it
takes credentials.

  * `:schemes` - each scheme by its name in the description, as `%{"oauth2" => :bearer}`.
  * `:operations` - every operation, as `WardrikRest.Operation`s.
  * `:types` - JSON Schemas by name. Any schema in the spec may refer to one as
    `%{"$ref" => "Campaign"}`, and a type's fields may have descriptions.

# `place`

```elixir
@type place() :: :bearer | {:header, String.t()} | {:query, String.t()}
```

Where a scheme puts its secret: `:bearer` for `Authorization: Bearer ...`, or a named header or
query parameter.

# `t`

```elixir
@type t() :: %WardrikRest.Spec{
  operations: [WardrikRest.Operation.t()],
  schemes: %{required(String.t()) =&gt; place()},
  title: String.t(),
  types: %{required(String.t()) =&gt; map()}
}
```

---

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