# oasis v0.7.0 - Table of Contents

> An Elixir/Plug OpenAPI v3 server implementation and code generator with JSON Schema validation

## Pages

- [Oasis](readme.md)
- [Changelog](changelog.md)

- Guides
  - [Handle Errors](handle_errors.md)
  - [Migrating to Oasis 0.7](migrating_to_0_7.md)
  - [Specification Extensions](specification_ext.md)
  - [HMAC-based Authentication](hmac_based_authentication.md)

## Modules

- [Mix.Oasis](Mix.Oasis.md): Builds the generation plan consumed by Oasis Mix tasks.
- [Mix.Oasis.Router](Mix.Oasis.Router.md): Generation-time descriptor of a single Plug route built from an OpenAPI
operation.
- [Oasis.CacheRawBodyReader](Oasis.CacheRawBodyReader.md): A `Plug.Parsers` body reader that preserves the raw request body.
- [Oasis.Controller](Oasis.Controller.md): Base on `Plug.Builder`, this module can be `use`-d into a module in order to build a plug pipeline
- [Oasis.HMACToken](Oasis.HMACToken.md): ## Callback
- [Oasis.HMACToken.Crypto](Oasis.HMACToken.Crypto.md): In general, when we define a hmac security scheme of the OpenAPI Specification,
the generated module will use this struct to define the required crypto-related
key information.

- [Oasis.Router](Oasis.Router.md): Base on `Plug.Router` to add a pre-parser to convert and validate the path param(s) in the
final generated HTTP verb match functions.
- [Oasis.Spec](Oasis.Spec.md): Loads and prepares OpenAPI documents for Oasis generation.
- [Oasis.Spec.Document](Oasis.Spec.Document.md): Represents a loaded and prepared OpenAPI document.
- [Oasis.Spec.OpenAPIRefResolver](Oasis.Spec.OpenAPIRefResolver.md): Resolves the structural OpenAPI Reference Objects selected by Oasis preparation.
- [Oasis.Token](Oasis.Token.md): A simple wrapper of `Plug.Crypto` to provide a way to generate and verify bearer token for use
in the [bearer security scheme](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#securitySchemeObject)
of the OpenAPI Specification.
- [Oasis.Token.Crypto](Oasis.Token.Crypto.md): A module to represent crypto-related key information.

- Plugs
  - [Oasis.Plug.BearerAuth](Oasis.Plug.BearerAuth.md): Functionality for providing Bearer HTTP authentication.
  - [Oasis.Plug.HMACAuth](Oasis.Plug.HMACAuth.md): Functionality for providing an HMAC HTTP authentication.
  - [Oasis.Plug.RequestValidator](Oasis.Plug.RequestValidator.md): A plug to convert types and validate the HTTP request parameters by the schemas of
the OpenAPI definition.

- Errors
  - [Oasis.BadRequestError.Invalid](Oasis.BadRequestError.Invalid.md): This error is used to indicate could not parse a parameter into the type due to client error.

  - [Oasis.BadRequestError.InvalidToken](Oasis.BadRequestError.InvalidToken.md): This error is used to indicate the provided token is expired, revoked, malformed, or invalid.

  - [Oasis.BadRequestError.JSONSchemaValidationFailed](Oasis.BadRequestError.JSONSchemaValidationFailed.md): Indicates that a request input failed JSON Schema validation.
  - [Oasis.BadRequestError.Required](Oasis.BadRequestError.Required.md): This error is used to indicate there missing a required parameter due to client error.

- Exceptions
  - [Oasis.BadRequestError](Oasis.BadRequestError.md): Error raised when some reason could not process the request due to client error.

  - [Oasis.FileNotFoundError](Oasis.FileNotFoundError.md): Error raised when use an invalid file path to generate corresponding modules.

  - [Oasis.InvalidSpecError](Oasis.InvalidSpecError.md): Error raised when use some invalid OpenAPI specification to generate corresponding modules.

## Mix Tasks

- [mix oas.gen.plug](Mix.Tasks.Oas.Gen.Plug.md): Generates router and plug handlers for a proper OpenAPI Specification in YAML or JSON file.

