Spikard.RouteBuilder (spikard v0.15.6-rc.18)

Copy Markdown

Builder for defining a route.

Summary

Types

t()

Builder for defining a route.

Functions

Attach a compression configuration for this route.

Attach a CORS configuration for this route.

Provide multipart file parameter configuration.

Declare the dependency keys that must be resolved before this handler runs.

Assign an explicit handler name.

Create a new builder for the provided HTTP method and path.

Provide a raw JSON schema for request parameters.

Provide a raw JSON schema for the request body.

Provide a raw JSON schema for the response body.

Mark the route as synchronous.

Types

t()

@type t() :: %Spikard.RouteBuilder{ref: reference()}

Builder for defining a route.

Functions

compression(obj, compression)

Attach a compression configuration for this route.

cors(obj, cors)

Attach a CORS configuration for this route.

file_params_json(obj, schema)

Provide multipart file parameter configuration.

handler_dependencies(obj, dependencies)

Declare the dependency keys that must be resolved before this handler runs.

handler_name(obj, name)

Assign an explicit handler name.

new(method, path)

Create a new builder for the provided HTTP method and path.

params_schema_json(obj, schema)

Provide a raw JSON schema for request parameters.

request_schema_json(obj, schema)

Provide a raw JSON schema for the request body.

response_schema_json(obj, schema)

Provide a raw JSON schema for the response body.

sync(obj)

Mark the route as synchronous.