Interface IControllersOptions

Options for 'controllers()' method of 'IHttpServer' instance.

interface IControllersOptions {
    allowEmptyTestSettings?: Nilable<boolean>;
    authorize?: Nilable<IControllersAuthorizeOptions>;
    imports?: Nilable<ImportValues>;
    loadOpenAPIFiles?: Nilable<boolean>;
    noQueryParams?: Nilable<boolean>;
    onControllerInitialized?: Nilable<ControllerInitializedEventHandler>;
    onControllerMethodInitialized?: Nilable<ControllerMethodInitializedEventHandler>;
    onParsingFailed?: Nilable<ParseErrorHandler>;
    onSchemaValidationFailed?: Nilable<ValidationFailedHandler>;
    onSwaggerInitialized?: Nilable<SwaggerInitializedEventHandler>;
    onValidationWithDocumentationFailed?: Nilable<JsonSchemaValidationFailedHandler>;
    parameterFormat?: Nilable<ControllerParameterFormat>;
    patterns?: Nilable<string | string[]>;
    requiresDocumentationEverywhere?: Nilable<boolean>;
    requiresTestModuleAsDefault?: Nilable<boolean>;
    requiresTestsEverywhere?: Nilable<boolean>;
    rootDir?: Nilable<string>;
    swagger?: Nilable<ControllersSwaggerOptionsValue>;
    testTimeout?: Nilable<number>;
    validateWithDocumentation?: Nilable<boolean>;
}

Properties

allowEmptyTestSettings?: Nilable<boolean>

Custom value, which indicates, that, if empty settings are allowed or not.

authorize?: Nilable<IControllersAuthorizeOptions>

Options for 'authorize' feature.

imports?: Nilable<ImportValues>

List of (value) imports.

loadOpenAPIFiles?: Nilable<boolean>

Tries to load endpoint documentation from .openapi files.

Default

true
noQueryParams?: Nilable<boolean>

Default value, that indicates, that query parameters should NOT be parsed.

onControllerInitialized?: Nilable<ControllerInitializedEventHandler>

An optional function, that is invoked after a controller has been created, initialized and added to the context.

onControllerMethodInitialized?: Nilable<ControllerMethodInitializedEventHandler>

An optional function, that is invoked after a controller method has been created, initialized and added to the context.

onParsingFailed?: Nilable<ParseErrorHandler>

Default parse error handler.

onSchemaValidationFailed?: Nilable<ValidationFailedHandler>

Default schema validation error handler.

onSwaggerInitialized?: Nilable<SwaggerInitializedEventHandler>

An optional function, that is invoked after a Swagger documentation has been loaded, initialized and added to the context.

onValidationWithDocumentationFailed?: Nilable<JsonSchemaValidationFailedHandler>

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

parameterFormat?: Nilable<ControllerParameterFormat>

The custom URL parameter format.

@default: ControllerParameterFormat.Default

patterns?: Nilable<string | string[]>

The custom file patterns.

requiresDocumentationEverywhere?: Nilable<boolean>

Value, which indicates, if all endpoints should have documentation or not.

Default

true
requiresTestModuleAsDefault?: Nilable<boolean>

Custom value, which indicates, that, if no settings are specified, a module file with it is required.

requiresTestsEverywhere?: Nilable<boolean>

Custom value, which indicates, that all endpoints require at least one test.

rootDir?: Nilable<string>

The custom root directory.

Default

"controllers"

Options to setup Swagger UI.

testTimeout?: Nilable<number>

Custom value for a (default) timeout for tests, in ms.

Default

5000
validateWithDocumentation?: Nilable<boolean>

Default, which indicates, to validate request data with schema in documentation prop of a request decorator like @GET() or @POST() or not.

Default

false

Generated using TypeDoc