Portolan

OpenAPI documentation for Phoenix built directly from typespecs, docs, and routes.

v0.2.0 Elixir MIT

A portolan was a medieval nautical chart describing ports and the routes between them. Portolan does the same for your Phoenix API.

It builds the OpenAPI document of a Phoenix application from what the code already says:

  • The router gives the paths, verbs, and actions.
  • @spec gives the parameters and responses of every action.
  • @type gives the schemas.
  • @moduledoc, @doc, and @typedoc give the descriptions.
  • @deprecated marks deprecated operations.

There is no extra DSL to learn and nothing to keep in sync. If something needed for the document is missing, the build fails with a compiler diagnostic pointing to the exact file and line.

Installation

def deps do
  [
    {:portolan, "~> 0.2"}
  ]
end