• Method decorator that indicates the method should be accessible through an HTTP Get operation

    Example

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

    @HttpGet('/user', 'List users in the system')
    async listUsers(
    @Query('search') search: string,
    @Response() res: ExpressResponse
    ): Promise<void> {
    ...
    }
    }

    Type Parameters

    • T

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

    Parameters

    • path: string

      URL which this method should be access through as a HTTP Get operation

    • Optional description: string

      Description of this route to be included in the OpenAPI documentation

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

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

        • target: T
        • propertyKey: string

        Returns void

Generated using TypeDoc