Oaskit
A fully featured OpenAPI Request validator for Elixir Plug applications
Install / Use
/learn @lud/OaskitREADME
Oaskit
<!-- rdmx :badges hexpm : "oaskit?color=4e2a8e" github_action : "lud/oaskit/elixir.yaml?label=CI&branch=main" license : oaskit --> <!-- rdmx /:badges -->Oaskit is a set of macros and plugs for Elixir/Phoenix applications to automatically validate incoming HTTP requests based on the OpenAPI Specification v3.1.
- Request bodies, path and query parameters validation with JSON schemas supported by JSV.
- Heavily inspired by OpenApiSpex.
- Mix task for JSON file specification generation.
Documentation
The Documentation is available on hexdocs, including a Quickstart Guide to dive right in.
Installation
<!-- rdmx :app_dep vsn:$app_vsn -->def deps do
[
{:oaskit, "~> 0.12"},
]
end
<!-- rdmx /:app_dep -->
You can also import formatter rules in your .formatter.exs file:
[
import_deps: [:oaskit]
]
Contributing
Pull requests are welcome, provided they include appropriate tests and documentation.
Roadmap
- Serve SwaggerUI or redoc.
- Provide header validation.
- Define JSON schemas for the default error handler responses.
