Interface IControllerRouteOptions

Options for a controller route without a body.

interface IControllerRouteOptions {
    authorize?: Nilable<AuthorizeArgumentValue>;
    deprecated?: Nilable<ControllerRouteDeprecatedValue>;
    documentation?: Nilable<{
        callbacks?: {
            [callback: string]: ReferenceObject | CallbackObject;
        };
        deprecated?: boolean;
        description?: string;
        externalDocs?: ExternalDocumentationObject;
        operationId?: string;
        parameters?: (ReferenceObject | ParameterObject)[];
        requestBody?: ReferenceObject | RequestBodyObject;
        responses: ResponsesObject;
        security?: SecurityRequirementObject[];
        servers?: ServerObject[];
        summary?: string;
        tags?: string[];
    }>;
    noAutoEnd?: Nilable<boolean>;
    noQueryParams?: Nilable<boolean>;
    onError?: Nilable<HttpErrorHandler>;
    onValidationWithDocumentationFailed?: Nilable<JsonSchemaValidationFailedHandler>;
    parameterFormat?: Nilable<ControllerParameterFormat>;
    path?: Nilable<string>;
    serializer?: Nilable<ResponseSerializer<any>>;
    use?: Nilable<HttpMiddleware | HttpMiddleware[]>;
    validateWithDocumentation?: Nilable<boolean>;
}

Hierarchy

Properties

authorize?: Nilable<AuthorizeArgumentValue>

Custom 'authorize' options.

deprecated?: Nilable<ControllerRouteDeprecatedValue>

Indicates, if route is deprecated or not.

documentation?: Nilable<{
    callbacks?: {
        [callback: string]: ReferenceObject | CallbackObject;
    };
    deprecated?: boolean;
    description?: string;
    externalDocs?: ExternalDocumentationObject;
    operationId?: string;
    parameters?: (ReferenceObject | ParameterObject)[];
    requestBody?: ReferenceObject | RequestBodyObject;
    responses: ResponsesObject;
    security?: SecurityRequirementObject[];
    servers?: ServerObject[];
    summary?: string;
    tags?: string[];
}>

Optional Swagger documentation.

Type declaration

noAutoEnd?: Nilable<boolean>

Should do no automatic response.end() call.

Default

false

noQueryParams?: Nilable<boolean>

Indicates, that query parameters should NOT be parsed.

onError?: Nilable<HttpErrorHandler>

The custom error handler.

onValidationWithDocumentationFailed?: Nilable<JsonSchemaValidationFailedHandler>

The handler, that is executed, when object validation with Swagger documentation failed.

parameterFormat?: Nilable<ControllerParameterFormat>

The custom URL parameter format (only for the route).

@default: ControllerParameterFormat.Default

path?: Nilable<string>

The custom path.

serializer?: Nilable<ResponseSerializer<any>>

The custom serializer.

use?: Nilable<HttpMiddleware | HttpMiddleware[]>

One or more middlewares for the route.

validateWithDocumentation?: Nilable<boolean>

Validate request data with schema in documentation or not.

Default

false

Generated using TypeDoc