# `Oaskit.SpecValidator`
[🔗](https://github.com/lud/oaskit/blob/v0.12.0/lib/oaskit/spec_validator.ex#L1)

A helper module used to cast and validate OpenAPI specifications into structs.

This module is **NOT** responsible for validating requests, responses and
payloads according to an OpenAPI specification (although it is involved in the
process). That is the role of `Oaskit.Plugs.ValidateRequest` and
`Oaskit.Validation.RequestValidator`.

This module validates the specification _itself_ according to the
`Oaskit.Spec.OpenAPI` JSON Schema.

# `validate`

Validates the given OpenAPI specification and returns an
`Oaskit.Spec.OpenAPI` struct in a result tuple.

# `validate!`

Validates the given OpenAPI specification and returns an
`Oaskit.Spec.OpenAPI` struct.

Raises on error.

---

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