Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IRouteDefinition

The standard definition for a route definition module. Objects that conform to this interface can be used to define declarative routes for expressjs.

These definitions can be leveraged by standardized routines that build actual routes that include input mapping, schema validation, request processing and output mapping.

Hierarchy

  • IRouteDefinition

Index

Properties

handler

The handler function that will handle requests to the route.

inputMapper

inputMapper: object | InputMapper

An optional input mapping definition to use when mapping the HTTP request to the handler input.

method

method: string

The HTTP method to apply to the route

Optional outputMapper

outputMapper: OutputMapper

An optional input output definition to use when handling the output of the handler to an HTTP response.

path

path: string

The URL path to the http request

Optional schema

schema: __type

An optional schema to validate requests after the input mapper has mapped the HTTP request to the input object.

Generated using TypeDoc