tokumei v0.9.1 Raxx.Blueprint View Source

Use an API Blueprint file as a router for Raxx server definitions.

Because are you really going to write the documentation afterwards.

defmodule MyApp do
  use Raxx.Server
  use Raxx.Blueprint, "./my_app.apib"

Module lookup

In a blueprint file actions can be given names. To work with Raxx.Blueprint actions need to be named. A module name is generated from these names and added as the handler for that route. For example given the blueprint below the router will assume there exits a module MyApp.CreateAMessage It will use this as the controller for all request to POST /messages.


# Messages [/messages]
## Create a message [POST]