Interface IControllerRouteDeprecatedOptions

Options for handling a deprecated status.

interface IControllerRouteDeprecatedOptions {
    appendMiddlewares?: Nilable<boolean>;
    isDeprecated?: Nilable<boolean>;
    onDeprecated?: Nilable<HttpMiddleware>;
    use?: Nilable<HttpMiddleware | HttpMiddleware[]>;
}

Properties

appendMiddlewares?: Nilable<boolean>

Append middlewares instead of prepend them.

Default

false

isDeprecated?: Nilable<boolean>

Indicates if route is deprecated or not.

Default

true

onDeprecated?: Nilable<HttpMiddleware>

A custom middleware, that may tell a client that the endpoint is deprecated and/or logs access.

The default behavior is, that the server will return a simple 410 HTTP response.

use?: Nilable<HttpMiddleware | HttpMiddleware[]>

One or more middlewares, that is added before onDeprecated, but only for the case that isDeprecated is activated.

Generated using TypeDoc