Rolodex v0.4.0 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 routes

Transforms the shared schemas

Link to this section Functions

Link to this function

process_headers(_)

Link to this function

process_routes(_)

Link to this function

process_schemas(_)

Link to this section Callbacks

Link to this callback

process(arg0, list, schemas)
process(Rolodex.Config.t(), [Rolodex.Route.t()], schemas :: 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.

Link to this callback

process_headers(arg0) (optional)
process_headers(Rolodex.Config.t()) :: map()

Generates top-level metadata for the output.

Link to this callback

process_routes(list) (optional)
process_routes([Rolodex.Route.t()]) :: map()

Transforms the routes.

Link to this callback

process_schemas(schemas) (optional)
process_schemas(schemas :: map()) :: map()

Transforms the shared schemas.