Rolodex v0.10.1 Rolodex.Processor behaviour
Takes a Rolodex.Config.t()
, a list of Rolodex.Route.t()
, and a map of shared
Rolodex.Schema
modules. Transforms them into a String.t()
, formatted for
the destination (e.g. Swagger JSON).
The only required function is process/3
, which is responsible for coordinating
processing and returning the formatted string.
Link to this section Summary
Callbacks
Process is responsible for turning each Rolodex.Route.t()
it receives and
turning it into a string so that it can be written
Generates top-level metadata for the output
Transforms the shared request body, response, and schema refs
Transforms the routes
Link to this section Functions
process_headers(_)
process_refs(_, _)
process_routes(_, _)
Link to this section Callbacks
process(arg0, list, serialized_refs)
process(Rolodex.Config.t(), [Rolodex.Route.t()], serialized_refs :: map()) ::
String.t()
process(Rolodex.Config.t(), [Rolodex.Route.t()], serialized_refs :: map()) :: String.t()
Process is responsible for turning each Rolodex.Route.t()
it receives and
turning it into a string so that it can be written.
process_headers(arg0)
(optional)
process_headers(Rolodex.Config.t()) :: map()
process_headers(Rolodex.Config.t()) :: map()
Generates top-level metadata for the output.
process_refs(refs, config)
(optional)
process_refs(refs :: map(), config :: Rolodex.Config.t()) :: map()
process_refs(refs :: map(), config :: Rolodex.Config.t()) :: map()
Transforms the shared request body, response, and schema refs
process_routes(list, arg1)
(optional)
process_routes([Rolodex.Route.t()], Rolodex.Config.t()) :: map()
process_routes([Rolodex.Route.t()], Rolodex.Config.t()) :: map()
Transforms the routes.