# ol.trixnity.schemas

Malli schema registry for ol.trixnity

Public namespaces validate arguments and normalize bridge-shaped data through
the schemas defined here before crossing into
[`ol.trixnity.internal.bridge`](api/ol-trixnity-internal-bridge.adoc).

The registry includes:

* public request and options maps for client, room, notification, and key
  operations
* normalized event, profile, room, notification, verification, and trust
  data shapes
* helper functions for building a registry and enforcing schema validation

Most callers use these namespaced keys indirectly through the higher-level
public APIs. Reach for this namespace directly when constructing config or
payload maps by hand.

## schemas

```clojure
(schemas _)
```

Returns the project Malli schema map for `opts`.

[source,window=_blank](https://github.com/outskirtslabs/trixnity-clj/blob/main/src/clj/ol/trixnity/schemas.clj#L73-L894)

---

## registry

```clojure
(registry opts)
```

Builds a Malli registry containing the project schemas and default schemas.

[source,window=_blank](https://github.com/outskirtslabs/trixnity-clj/blob/main/src/clj/ol/trixnity/schemas.clj#L896-L901)

---

## schema-registry

Default Malli registry used by public API validation.

[source,window=_blank](https://github.com/outskirtslabs/trixnity-clj/blob/main/src/clj/ol/trixnity/schemas.clj#L903-L905)

---

## validate!

```clojure
(validate! schema-id data)
(validate! registry schema-id data)
```

Validates `data` against `schema-id` and returns `data` on success.

Throws `ExceptionInfo` with humanized Malli errors on validation failure.

[source,window=_blank](https://github.com/outskirtslabs/trixnity-clj/blob/main/src/clj/ol/trixnity/schemas.clj#L910-L924)
