Type Alias GatewayControllerCreatorOptions

GatewayControllerCreatorOptions: DeepPartial<GatewayControllerExtraOptions> & {
    gatewayClass?: typeof GatewayController;
    gatewaySettingName?: string;
    getMiddlewares?: GatewayControllerGetMiddlewaresFn;
    helperServiceName?: string;
    serviceName?: string;
}

The options for the controller creator that mounts the GatewayController.

Type declaration

  • OptionalgatewayClass?: typeof GatewayController

    The class the creator will instantiate. Similar to the API Client, this allows for extra customization as you can send a custom subclass of the GatewayController.

    GatewayController
    
  • OptionalgatewaySettingName?: string

    The name of the configuration setting where the gateway configuration is stored. If not overwritten, check the description of serviceName to understand which will be its default value.

    'api'
    
  • OptionalgetMiddlewares?: GatewayControllerGetMiddlewaresFn

    A function to generate a list of middlewares that can be executed before the controller main middleware.

  • OptionalhelperServiceName?: string

    The name of the helper service the creator will try to obtain from the container. If serviceName is overwritten, the default for this will be ${serviceName}Helper.

    'apiGatewayHelper'
    
  • OptionalserviceName?: string

    The name the creator will use to register the controller in the container. No, this is not a typo. The creator will register the controller so other services can access the getAPIConfig method. The service will be available after the app routes are mounted. If this is overwritten, the creator will ensure that the name ends with Gateway; and if overwritten, but it doesn't include Gateway at the end, and no gatewaySettingName was defined, the creator will use the custom name (without Gatway) for gatewaySettingName.

    'apiGateway'