Versionary: Elixir plug for handling API versioning

Version 0.2.0 of Versionary has been released.

This release adds the ability to check for versions against media type config. This works similarly to Phoenix’s accepts plug.

config :mime, :types, %{
  "application/vnd.app.v1+json" => [:v1]
}

plug Versionary.Plug.VerifyHeader, accepts: [:v1]

This release also adds Versionary.Plug.PhoenixErrorHandler for rendering a Phoenix error view when validation fails.

GitHub: GitHub - sticksnleaves/versionary: Plug for API versioning · GitHub
Documentation: API Reference — Versionary v0.4.1
Hex: versionary | Hex

2 Likes