• Parameter decorator which defines a query string parameter to be provided to the Express route

    Example

    @Controller('/api', 'User', 'User Management Routes')
    class User {

    @HttpGet('/user', 'List users in the system')
    async listUsers(
    @Query('search', 'Search string to lookup users by first or last name', 'Paul', false, false) search: string,
    @Response() res: ExpressResponse
    ): Promise<void> {
    ...
    }
    }

    Type Parameters

    • T

      Class method to be registered with the Express application as a route

    Parameters

    • key: string

      name of parameter in the query string

    • Optional summary: string

      description of the parameter for OpenAPI documentation

    • Optional exampleValue: string | number | boolean

      example of expected data

    • Optional required: boolean

      indicate if this parameter is required

    • Optional deprecated: boolean

      indicate if this parameter is deprecated

    Returns ((target: T, propertyKey: string, parameterIndex: number) => void)

      • (target: T, propertyKey: string, parameterIndex: number): void
      • Parameters

        • target: T
        • propertyKey: string
        • parameterIndex: number

        Returns void

Generated using TypeDoc