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.
-
@specgives the parameters and responses of every action. -
@typegives the schemas. -
@moduledoc,@doc, and@typedocgive the descriptions. -
@deprecatedmarks 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