# `Sake.Resource.Spec`
[🔗](https://github.com/hattoriai/sake/blob/v0.4.3/lib/sake/resource.ex#L23)

The compiled definition of a resource.

`mount` is `nil` for a resource the server declares itself, and
`{server, prefix, spec}` for one it mounted (`Sake.Server.mount/2`):
the server it came from, the mount's prefix, and the spec as that
server has it. `proxy` is the `Sake.Proxy` whose upstream serves a
proxied resource; it has no `module`.

# `t`

```elixir
@type t() :: %Sake.Resource.Spec{
  annotations: term(),
  authentication: term(),
  description: term(),
  icons: term(),
  meta: term(),
  mime_type: term(),
  module: term(),
  mount: term(),
  name: term(),
  params: term(),
  proxy: term(),
  regex: term(),
  scopes: term(),
  subscribe: term(),
  template: term(),
  title: term(),
  ttl: term(),
  ui: term(),
  uri: term()
}
```

# `listed_to_wire`

```elixir
@spec listed_to_wire(t(), String.t() | map(), String.t()) :: map()
```

The wire entry of a concrete resource produced by `list/1`.

# `match`

```elixir
@spec match(t(), String.t()) :: {:ok, map()} | :error
```

# `put_uri`

```elixir
@spec put_uri(t(), String.t()) :: t()
```

The spec at another URI, with its template pattern compiled again:
a mounted server's resources move under the mount's prefix.

# `template_to_wire`

```elixir
@spec template_to_wire(t(), String.t()) :: map()
```

# `to_wire`

```elixir
@spec to_wire(t(), String.t()) :: map()
```

---

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